From a425a78f7cfc0a4491ed52b15d2399073accd8aa Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 17 Sep 2016 19:59:49 +0200 Subject: [PATCH 1/3] add a lighthouse to the sample data. --- .gitignore | 6 ------ src/lighthouse.test.c | 3 +-- tests/data/184.dat | Bin 7720 -> 7443 bytes 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index fd1a7c349..8e19d4018 100644 --- a/.gitignore +++ b/.gitignore @@ -26,12 +26,6 @@ ipch/ *.bak bin/ build*/ -game-e2/data -game-e2/*.log* -game-e2/reports/ -game-e3/data/ -game-e3/*.log* -game-e3/reports/ *.log *.log.* tags diff --git a/src/lighthouse.test.c b/src/lighthouse.test.c index 193de58a6..ded77649a 100644 --- a/src/lighthouse.test.c +++ b/src/lighthouse.test.c @@ -18,12 +18,11 @@ static void test_lighthouse_range(CuTest * tc) { faction *f; unit *u; - region *r1, *r2; + region *r1; building *b; test_setup(); r1 = test_create_region(0, 0, 0); - r2 = test_create_region(1, 0, 0); f = test_create_faction(0); u = test_create_unit(f, r1); b = test_create_building(r1, test_create_buildingtype("lighthouse")); diff --git a/tests/data/184.dat b/tests/data/184.dat index d219f92ddd96f5bdd7d9ee4c4e5276bbb1dee895..a1ee8802ae2c9c8ebc6ba5a1b04acfd9be5b559d 100644 GIT binary patch delta 1458 zcmZ9Mdq`7J9LLXnZSLV~)9IZ-@1m%%vSnt`?(SU)1(m%?dJZS(Mm38lusO9ow3@dU zlob_W1-&fD=tUSo*~=hHQ6n5I8gS$~h9!v@SlDv(In(~VQEr*V2VLF!kIxs3=`rYNx6&N;_ zUd_hR*9SD7%YobiZZGf?R{*rA76NNk(}53EGk|*aQed%q8t|k#FC9*R1iJF7|4$C$ z-0K``TnL=Lh;K=#hViY0IY6DJ2DndSHz10t3x5cWRK&k)HiKEF<$*!%Okk@PZ>iHw z0g5`j%tIY-M%1&**&4y^_6%{jaMg(){R-f)L_hFc z;%s1F;(Xw|Bqy*rX^sI|nYylUn@Ld#pNyv#Cgb>#b-Pf9HWKajdC;!|R&}SRtz1I3=Y+REM8%tq=J`K(yQnjb=cH}C|(zIeQ+tct_hNVv}Le%Fc z+1j~|@^wy+r+i}>(rQafik%*(yL^)aMS5G=m8q9XTuw(xw8IqQoaJS3sW26x1hsXc zAQdc<5YMnyuFUOnY(1L7I9%(~O#Ep*KCXhWKodDAwD2u|sjy zpwW!~?~7Iokz?rH4Sydc5gJQX_BC9{Bs9)eb^Z1?GRKL5ihH5+W5}QsIOhK^$Vyf3 zkGH21Ia;c2`_(*z&?u?0zWt8kML^LuYjq&}R!igro3H8eA>1x??E8H^$QbE`o!!;= z`GKO7u!O``_wG5%6HC|`Z~d8GvUG{^`S&!bCu#9W(d|9#(ZLK0Nnp^8g1 zq1m{a6Bn8k-zt=1Rqgb*y&X;F*j=}~f0LaMQRsQi4~EEbR&Vd#ujG21P}O$obpKp^ LQlrSEZRgJIckf^O?wrs0{?0j^jZJP&l^((| zjKDCABFKDwo-H7aa(=QWNTn@LhO2)ySvh4JR-*lzq@3k5 zDQDm#ONKf|mI^{A^ka5t1r1nzT#xVB<)?nyWb?vNh< z@U}eF4Kj@N`sB3;6#OkW09X*T%{7gdEFJj#D;1@l2PuGh7jz5+qk!SHxV5EkJPF0? z6-R-hg1O-{gA+y0FmuBIiDtUWy62FBl%%mS5h?;IBlZE;HL^Bz&CF7&|)a1e@0|)`!#6=4)A@+)H$Kgx*a zEbRn8s-epp+d9y;&pHoDbip({6D`20s-C$;!3wpQ<$d{2l26m>Vtefm)ZF1sGo`~# KEdmqg)%^#w4f?_W From d3d9b097bcdf2fa14a76f594551e2278a0d4356f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 17 Sep 2016 20:34:06 +0200 Subject: [PATCH 2/3] add some lighthouse checks to integration tests. --- tests/run-turn.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/run-turn.sh b/tests/run-turn.sh index d47ac81a2..92eac8948 100755 --- a/tests/run-turn.sh +++ b/tests/run-turn.sh @@ -53,6 +53,9 @@ assert_grep_count reports/$CRFILE '^BURG' 1 assert_grep_count reports/$CRFILE '^EINHEIT' 2 assert_grep_count reports/$CRFILE '^GEGENSTAENDE' 2 +assert_grep_count reports/185-heg.nr 'vom Turm erblickt' 6 +assert_grep_count reports/185-heg.cr '"lighthouse";visibility' 6 +assert_grep_count reports/185-heg.cr '"neighbour";visibility' 11 assert_grep_count reports/185-6rLo.cr '^EINHEIT' 2 assert_grep_count reports/185-6rLo.cr '^REGION' 13 echo "integration tests: PASS" From 1fb061c6f0b01e872d561ab1e03b782ccec5d538 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 17 Sep 2016 20:35:41 +0200 Subject: [PATCH 3/3] syntax error (bash functions are hard). --- tests/run-turn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-turn.sh b/tests/run-turn.sh index 92eac8948..519ed8bd8 100755 --- a/tests/run-turn.sh +++ b/tests/run-turn.sh @@ -53,7 +53,7 @@ assert_grep_count reports/$CRFILE '^BURG' 1 assert_grep_count reports/$CRFILE '^EINHEIT' 2 assert_grep_count reports/$CRFILE '^GEGENSTAENDE' 2 -assert_grep_count reports/185-heg.nr 'vom Turm erblickt' 6 +assert_grep_count reports/185-heg.nr 'erblickt' 6 assert_grep_count reports/185-heg.cr '"lighthouse";visibility' 6 assert_grep_count reports/185-heg.cr '"neighbour";visibility' 11 assert_grep_count reports/185-6rLo.cr '^EINHEIT' 2