From a582c69523d6287e0632e60402741b17fe7ab351 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 11 Sep 2015 12:27:45 +0200 Subject: [PATCH] finished and tested: terrains can be completely defined in JSON. --- src/kernel/jsonconf.test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kernel/jsonconf.test.c b/src/kernel/jsonconf.test.c index ef7b7c0d1..2fd8e3efe 100644 --- a/src/kernel/jsonconf.test.c +++ b/src/kernel/jsonconf.test.c @@ -418,6 +418,10 @@ static void test_terrains(CuTest * tc) CuAssertPtrNotNull(tc, ter->name); // anything named "plain" uses plain_name() CuAssertPtrNotNull(tc, ter->production); CuAssertPtrEquals(tc, rt_get_or_create("stone"), (resource_type *)ter->production[0].type); + CuAssertDblEquals(tc, 0.1, ter->production[0].chance, 0.01); + CuAssertStrEquals(tc, "1d4", ter->production[0].base); + CuAssertStrEquals(tc, "1d5", ter->production[0].divisor); + CuAssertStrEquals(tc, "1d6", ter->production[0].startlevel); CuAssertPtrEquals(tc, rt_get_or_create("iron"), (resource_type *)ter->production[1].type); CuAssertPtrEquals(tc, 0, (void *)ter->production[2].type);