this test is poorly written, and a trap

This commit is contained in:
Enno Rehling 2016-03-10 23:05:24 +01:00
parent c21d5290ef
commit be0cc93917
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ static void test_flyingship(CuTest * tc)
CuAssertTrue(tc, !flying_ship(sh1)); CuAssertTrue(tc, !flying_ship(sh1));
CuAssertIntEquals(tc, 10, sp_flying_ship(&co)); CuAssertIntEquals(tc, 10, sp_flying_ship(&co));
CuAssertTrue(tc, flying_ship(sh1)); CuAssertTrue(tc, flying_ship(sh1));
co.par = 0;
free_castorder(&co); free_castorder(&co);
sh2 = test_create_ship(r, shipType2); sh2 = test_create_ship(r, shipType2);
@ -58,6 +59,7 @@ static void test_flyingship(CuTest * tc)
CuAssertTrue(tc, !flying_ship(sh2)); CuAssertTrue(tc, !flying_ship(sh2));
CuAssertIntEquals(tc, 0, sp_flying_ship(&co)); CuAssertIntEquals(tc, 0, sp_flying_ship(&co));
CuAssertTrue(tc, !flying_ship(sh2)); CuAssertTrue(tc, !flying_ship(sh2));
co.par = 0;
free_castorder(&co); free_castorder(&co);
test_cleanup(); test_cleanup();
} }