empserver/tests
Markus Armbruster 60450f1637 update: Fix work inconsistency with neweff, production
In Empire, even babies work.

neweff and production compute the projected population's work,
discarding fractions.

The update first computes the adults' work (discarding fractions),
then newborns' work (discarding fractions), then adds them together.
Double rounding.  Moreover, it uses the old work percentage for the
adults' work, and the new one for the newborns' work.  Broken in
Empire 3.

Fix by recomputing work after grow_people().  This is how things
worked before the regression.  Also restores a bug: growfood()'s work
use is ignored.  Harmless, because fcrate and fgrate are too low for
growfood() to produce anything, and nobody customizes them.  Mark
FIXME anyway.

Update test output changes as expected: available work differs in
sectors where double rounding discards work, an in sectors with
changing work percentage.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2017-08-06 19:59:56 +02:00
..
actofgod retreat lretreat edit xdump: Change "torped" to "torpedoed" 2015-03-02 08:20:49 +01:00
bridgefall sail: Remove option SAIL 2015-02-28 16:11:28 +01:00
build sail: Remove option SAIL 2015-02-28 16:11:28 +01:00
empdump power: Make item power value configurable 2017-08-06 19:59:45 +02:00
fairland sail: Remove option SAIL 2015-02-28 16:11:28 +01:00
files sail: Remove option SAIL 2015-02-28 16:11:28 +01:00
fire torpedo fire: Reveal sub hit by return fire or depth charge 2015-03-02 08:20:52 +01:00
info tests/info: New; checks info and code agree on commands 2014-01-06 20:50:06 +01:00
navi-march navigate march: Fix abort not to wipe out concurrent updates 2015-12-05 13:19:39 +01:00
retreat torpedo fire: Reveal sub hit by return fire or depth charge 2015-03-02 08:20:52 +01:00
smoke update: Fix work inconsistency with neweff, production 2017-08-06 19:59:56 +02:00
torpedo torpedo: Suppress bulletin when player torpedoes his own ship 2015-03-02 08:20:52 +01:00
update update: Fix work inconsistency with neweff, production 2017-08-06 19:59:56 +02:00
version nsc: Expose generalized build materials in xdump and conditionals 2017-08-06 19:59:56 +02:00
actofgod-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
bridgefall-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
build-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
empdump-test tests: Rewrite the previous commit's sed_i helper 2015-03-04 08:15:13 +01:00
fairland-test tests/files tests/fairland: Check stderr and exit status 2015-02-01 16:52:59 +01:00
files-test tests/files tests/fairland: Check stderr and exit status 2015-02-01 16:52:59 +01:00
fire-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
info-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
navi-march-test navigate: Require all ships to start in the same sector 2015-02-28 16:13:14 +01:00
normalize.pl tests/version: New; exercises config introspection commands 2017-08-06 14:03:55 +02:00
retreat-test tests/retreat: Cover trains 2015-03-02 08:20:48 +01:00
smoke-test tests: Define and use some abbreviations 2015-02-01 16:52:59 +01:00
test-common.sh tests/version: New; exercises config introspection commands 2017-08-06 14:03:55 +02:00
torpedo-test tests/torpedo: New; exercises torpedo command 2015-03-02 08:20:52 +01:00
update-test tests/update: New; exercises the update 2017-08-06 14:04:15 +02:00
version-test tests/version: New; exercises config introspection commands 2017-08-06 14:03:55 +02:00