Commit graph

56 commits

Author SHA1 Message Date
Enno Rehling
75f41a7169 fix crashes on 64-bit systems (not all 0s are created equal). 2018-01-14 09:38:26 +01:00
Enno Rehling
f98eab56c4 platform.h is only for WIN32 now.
replace MIN and MAX macros, they are BAD.
2017-12-29 06:13:28 +01:00
Enno Rehling
cff4e12fbd celan up tests, rename test_cleanup -> test_teardown. 2017-12-27 19:58:39 +01:00
Enno Rehling
e2f954b7f6 BUG 2392: anyone can use weapons, as long as they have _some_ skill. 2017-12-17 10:16:56 +01:00
Enno Rehling
3864a00482 remove stealing from economy.c (that file is too big). 2017-12-04 20:01:08 +01:00
Enno Rehling
05425b5101 pull economy requests into header, rename the struct. 2017-12-04 19:20:48 +01:00
Enno Rehling
8a638859fd fix memory access in rc_setoption 2017-11-20 08:24:56 +01:00
Enno Rehling
96ff0815c4 newterrain sucks. 2017-11-05 19:15:43 +01:00
Enno Rehling
440679da87 code that uses newterrain needs to set up terrains in tests. 2017-11-05 17:00:40 +01:00
Enno Rehling
2b81334ba2 use the correct swamp terrain, still failing. newterrain is a plague. 2017-11-05 16:43:01 +01:00
Enno Rehling
3fdde8a4aa refactor original trade test to use shared setup function. 2017-11-05 15:14:54 +01:00
Enno Rehling
12646f726a Add a failing test for bug 2379. 2017-11-05 15:11:02 +01:00
Enno Rehling
a17c8ada71 Add a test for the happy case of the BUY command. 2017-11-04 20:10:05 +01:00
Enno Rehling
c4f7e36903 fix valgrind report in a test (bad rtype construction) 2017-08-09 19:39:29 +02:00
Enno Rehling
898c12e99a XML construction elements never have a building.
required buildings are encoded by RMT_PROD_REQUIRE.
improved error messaging.
2017-05-06 15:53:21 +02:00
Enno Rehling
e72155a563 WIP: reimplemented production modifiers.
The system itself seems to work, but some Lua tests are still failing.
2017-04-02 14:43:53 +02:00
Enno Rehling
17145eaf10 make region:set_resource do the right thing
also for adamantium
2017-03-22 20:37:09 +01:00
Enno Rehling
720c41c1bf reproduce bug 2313.
recruiting breaks f->num_units.
2017-03-12 12:53:10 +01:00
Enno Rehling
51ec560f72 Merge branch 'master' into develop
Conflicts:
	scripts/tests/e2/init.lua
	scripts/tests/e3/init.lua
	src/economy.c
	src/economy.test.c
	src/kernel/item.c
	src/modules/arena.c
2017-03-11 14:41:25 +01:00
Enno Rehling
cdf13c9fec stop using test_create_world, use test_setup. 2017-03-11 14:22:21 +01:00
Enno Rehling
b0baba4405 bug 2290: sawmill bonus was broken.
not pleased with the test, which is in lua only.
https://bugs.eressea.de/view.php?id=2290
2017-03-02 19:21:11 +01:00
Enno Rehling
d4b973fea4 remove resource_limit struct indirection. 2017-02-26 13:55:19 +01:00
Enno Rehling
84c6a4b7b5 remove last vestiges of the rm_* material names 2017-02-25 21:25:55 +01:00
Enno Rehling
6031dff685 resource_limit.value is always zero, never initialized. kill it. 2017-02-25 19:50:32 +01:00
Enno Rehling
3a985108a6 change all magic resistance to use fractions. 2017-02-24 20:47:47 +01:00
Enno Rehling
be42137833 fix rmt_find for trees 2017-02-23 08:02:24 +01:00
Enno Rehling
1498f2e1d7 refactor rawmaterial_type.
still have to decide if we need it at all.
2017-02-22 21:10:22 +01:00
Enno Rehling
4e5f1d05ce Be very strict about C standards.
Compile with -std=c89 in gcc.
remove all // comments (they are nice, but unnecessary).
variables only declared at start of block.
various pedantery.
backwards compatible va_copy for pre-C99 gcc.
2017-02-18 21:15:14 +01:00
Enno Rehling
aee68fbd0f github issue #658
MACHE 1 EISEN use 1 iron even with savings.
2017-02-18 11:19:42 +01:00
Enno Rehling
2328975dc2 do not use floats for material-save.
abusing variants for storing short fractions.
remove unused RMF_SAVERESOURCE.
2017-02-17 21:45:10 +01:00
Enno Rehling
a624915a06 error message if building is required.
was broken in recent commit.
also fix reference counts.
2017-02-16 20:26:34 +01:00
Enno Rehling
5902a6922f BUG 2279: add a failing unit test. 2017-02-15 20:50:45 +01:00
Enno Rehling
5680057e7f adding simple test for MAKE <ITEM> 2017-02-15 17:09:23 +01:00
Enno Rehling
d3efc265c3 calculating income for dragons is no longer hard-coded 2016-10-04 09:14:49 +02:00
Enno Rehling
cbd1e8c457 Fixing https://bugs.eressea.de/view.php?id=2234
remove the MTF_VITAL materials flag.
remove remaining BLD_MAINTAINED vs BLD_WORKING code.
2016-10-01 18:34:38 +02:00
Enno Rehling
fc6ab724a5 fix the economy test. no idea why it passes now?
this doesn't represent the bug 2234 that I am trying to repro, yet.
2016-09-27 15:40:03 +02:00
Enno Rehling
f2d0d74e70 fix the test, except it doesn't fail anymore? 2016-09-27 15:02:22 +02:00
Enno Rehling
10806a1d95 add a failing test for bug 2234 2016-09-27 08:25:58 +02:00
Enno Rehling
dc5fe4a0eb recruiting fewer units than expected creates a message. 2016-09-18 13:49:34 +02:00
Enno Rehling
b3c31856aa add (failing) test for recruiting into existing units. 2016-09-18 11:34:54 +02:00
Enno Rehling
d3e05c7ddf merge in and fix the economy tests 2016-08-21 20:04:51 +02:00
Enno Rehling
b2e79dc5e9 building maintenance unit tests.
backfilling some very basic test coverage.
2016-08-21 20:01:30 +02:00
Steffen Mecke
1f4c521ac8 encapsulate r->land->peasants, money, horses, herbs, morale 2015-12-08 17:57:23 +01:00
Enno Rehling
950bf91850 fix merge conflict in PR #397 (config changes) 2015-11-26 18:48:21 +01:00
Steffen Mecke
01f4ebd4ce test for fixed value instead of range 2015-11-14 17:14:38 +01:00
Steffen Mecke
493b45c832 taxing without skill does not fail silently any more
http://bugs.eressea.de/view.php?id=2158
added configuration parameter for tax per level
2015-11-14 15:36:14 +01:00
Enno Rehling
cd1467f668 cleanup: test_create_world is lazy 2015-10-13 22:31:03 +02:00
Enno Rehling
7854684d8b fix memory leaks in all tests that create an order without calling free_order at the end. 2015-10-13 15:45:38 +02:00
Enno Rehling
7e64f3177d refactoring: rewrite tests to use test_find_messagetype instead of assert_messages.
tests: add cleanup of message_types to reduce global state.
2015-08-17 19:36:28 +02:00
Steffen Mecke
78d4d2fc1b add test for hero recruits 2015-02-16 20:44:03 +01:00