diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c index 247a06a..e2ca8af 100644 --- a/build/test/cache/test_Spiellogik.c +++ b/build/test/cache/test_Spiellogik.c @@ -62,6 +62,26 @@ void test_win_SchlangegroesseAusreichend(void){ + + +void test_win_SchlangeNichtAusreichend(void){ + + int realU[20][20] = {0}; + + realU[15][5] = 15; + + int result = win(realU); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT); + +} + void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ int realU[20][20]; @@ -76,7 +96,7 @@ void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ ((void *)0) - ), (UNITY_UINT)(35), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); } @@ -96,7 +116,7 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){ ((void *)0) - ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(51), UNITY_DISPLAY_STYLE_INT); } @@ -122,7 +142,7 @@ void test_lose_up_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(54), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_INT); } @@ -146,7 +166,7 @@ void test_lose_up_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(64), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(72), UNITY_DISPLAY_STYLE_INT); } @@ -170,7 +190,7 @@ void test_lose_up_Obererrand(void){ ((void *)0) - ), (UNITY_UINT)(74), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT); } @@ -194,7 +214,7 @@ void test_lose_down_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(92), UNITY_DISPLAY_STYLE_INT); } @@ -220,7 +240,7 @@ void test_lose_down_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); } @@ -244,7 +264,7 @@ void test_lose_left_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(113), UNITY_DISPLAY_STYLE_INT); } @@ -270,7 +290,7 @@ void test_lose_left_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(116), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT); } @@ -294,7 +314,7 @@ void test_lose_left_linkerRand(void){ ((void *)0) - ), (UNITY_UINT)(126), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(134), UNITY_DISPLAY_STYLE_INT); } @@ -318,7 +338,7 @@ void test_lose_right_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(144), UNITY_DISPLAY_STYLE_INT); } @@ -344,7 +364,7 @@ void test_lose_right_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(147), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(155), UNITY_DISPLAY_STYLE_INT); } @@ -368,6 +388,6 @@ void test_lose_right_rechterRand(void){ ((void *)0) - ), (UNITY_UINT)(157), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(165), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/out/c/test_Spiellogik.o b/build/test/out/c/test_Spiellogik.o index 6a63dcf..0dc3b6a 100644 Binary files a/build/test/out/c/test_Spiellogik.o and b/build/test/out/c/test_Spiellogik.o differ diff --git a/build/test/out/c/test_Spiellogik_runner.o b/build/test/out/c/test_Spiellogik_runner.o index cd825d7..3a859ca 100644 Binary files a/build/test/out/c/test_Spiellogik_runner.o and b/build/test/out/c/test_Spiellogik_runner.o differ diff --git a/build/test/out/test_Spiellogik.out b/build/test/out/test_Spiellogik.out index 0e78704..e871203 100755 Binary files a/build/test/out/test_Spiellogik.out and b/build/test/out/test_Spiellogik.out differ diff --git a/build/test/preprocess/files/test_Spiellogik.c b/build/test/preprocess/files/test_Spiellogik.c index 247a06a..e2ca8af 100644 --- a/build/test/preprocess/files/test_Spiellogik.c +++ b/build/test/preprocess/files/test_Spiellogik.c @@ -62,6 +62,26 @@ void test_win_SchlangegroesseAusreichend(void){ + + +void test_win_SchlangeNichtAusreichend(void){ + + int realU[20][20] = {0}; + + realU[15][5] = 15; + + int result = win(realU); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT); + +} + void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ int realU[20][20]; @@ -76,7 +96,7 @@ void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ ((void *)0) - ), (UNITY_UINT)(35), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); } @@ -96,7 +116,7 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){ ((void *)0) - ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(51), UNITY_DISPLAY_STYLE_INT); } @@ -122,7 +142,7 @@ void test_lose_up_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(54), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_INT); } @@ -146,7 +166,7 @@ void test_lose_up_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(64), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(72), UNITY_DISPLAY_STYLE_INT); } @@ -170,7 +190,7 @@ void test_lose_up_Obererrand(void){ ((void *)0) - ), (UNITY_UINT)(74), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT); } @@ -194,7 +214,7 @@ void test_lose_down_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(92), UNITY_DISPLAY_STYLE_INT); } @@ -220,7 +240,7 @@ void test_lose_down_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); } @@ -244,7 +264,7 @@ void test_lose_left_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(113), UNITY_DISPLAY_STYLE_INT); } @@ -270,7 +290,7 @@ void test_lose_left_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(116), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT); } @@ -294,7 +314,7 @@ void test_lose_left_linkerRand(void){ ((void *)0) - ), (UNITY_UINT)(126), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(134), UNITY_DISPLAY_STYLE_INT); } @@ -318,7 +338,7 @@ void test_lose_right_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(144), UNITY_DISPLAY_STYLE_INT); } @@ -344,7 +364,7 @@ void test_lose_right_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(147), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(155), UNITY_DISPLAY_STYLE_INT); } @@ -368,6 +388,6 @@ void test_lose_right_rechterRand(void){ ((void *)0) - ), (UNITY_UINT)(157), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(165), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass index e883538..376aeb9 100644 --- a/build/test/results/test_Spiellogik.pass +++ b/build/test/results/test_Spiellogik.pass @@ -11,64 +11,68 @@ :line: 22 :message: '' :unity_test_time: 0 +- :test: test_win_SchlangeNichtAusreichend + :line: 31 + :message: '' + :unity_test_time: 0 - :test: test_feldFrei_Verhalten_bei_belegtem_Feld - :line: 30 + :line: 38 :message: '' :unity_test_time: 0 - :test: test_feldFrei_Verhalten_bei_freiem_Feld - :line: 38 + :line: 46 :message: '' :unity_test_time: 0 - :test: test_lose_up_freiesFeld - :line: 49 + :line: 57 :message: '' :unity_test_time: 0 - :test: test_lose_up_belegtesFeld - :line: 58 + :line: 66 :message: '' :unity_test_time: 0 - :test: test_lose_up_Obererrand - :line: 69 + :line: 77 :message: '' :unity_test_time: 0 - :test: test_lose_down_freiesFeld - :line: 79 + :line: 87 :message: '' :unity_test_time: 0 - :test: test_lose_down_belegtesFeld - :line: 89 + :line: 97 :message: '' :unity_test_time: 0 - :test: test_lose_left_freiesFeld - :line: 100 + :line: 108 :message: '' :unity_test_time: 0 - :test: test_lose_left_belegtesFeld - :line: 110 + :line: 118 :message: '' :unity_test_time: 0 - :test: test_lose_left_linkerRand - :line: 121 + :line: 129 :message: '' :unity_test_time: 0 - :test: test_lose_right_freiesFeld - :line: 131 + :line: 139 :message: '' :unity_test_time: 0 - :test: test_lose_right_belegtesFeld - :line: 141 + :line: 149 :message: '' :unity_test_time: 0 - :test: test_lose_right_rechterRand - :line: 152 + :line: 160 :message: '' :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 15 - :passed: 15 + :total: 16 + :passed: 16 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0010818149985425407 +:time: 0.001048741998602054 diff --git a/build/test/results/test_Umgebung.pass b/build/test/results/test_Umgebung.pass index ba7a29b..17541d9 100644 --- a/build/test/results/test_Umgebung.pass +++ b/build/test/results/test_Umgebung.pass @@ -19,4 +19,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0012024529987684218 +:time: 0.0011768759995902656 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index ab43257..e43737c 100644 --- a/build/test/results/test_test.pass +++ b/build/test/results/test_test.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.001348579000477912 +:time: 0.0012329210003372282 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c index 1385387..986fc0f 100644 --- a/build/test/runners/test_Spiellogik_runner.c +++ b/build/test/runners/test_Spiellogik_runner.c @@ -12,6 +12,7 @@ extern void setUp(void); extern void tearDown(void); extern void test_test1(void); extern void test_win_SchlangegroesseAusreichend(void); +extern void test_win_SchlangeNichtAusreichend(void); extern void test_feldFrei_Verhalten_bei_belegtem_Feld(void); extern void test_feldFrei_Verhalten_bei_freiem_Feld(void); extern void test_lose_up_freiesFeld(void); @@ -91,19 +92,20 @@ int main(void) UnityBegin("test_Spiellogik.c"); run_test(test_test1, "test_test1", 12); run_test(test_win_SchlangegroesseAusreichend, "test_win_SchlangegroesseAusreichend", 22); - run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 30); - run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 38); - run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 49); - run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 58); - run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 69); - run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 79); - run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 89); - run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 100); - run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 110); - run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 121); - run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 131); - run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 141); - run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 152); + run_test(test_win_SchlangeNichtAusreichend, "test_win_SchlangeNichtAusreichend", 31); + run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 38); + run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 46); + run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 57); + run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 66); + run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 77); + run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 87); + run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 97); + run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 108); + run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 118); + run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 129); + run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 139); + run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 149); + run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 160); return UnityEnd(); } diff --git a/test/test_Spiellogik.c b/test/test_Spiellogik.c index 69a006b..4759189 100644 --- a/test/test_Spiellogik.c +++ b/test/test_Spiellogik.c @@ -27,6 +27,14 @@ void test_win_SchlangegroesseAusreichend(void){ TEST_ASSERT_EQUAL_INT(1, result); } +//Test Schlange nicht lang genug +void test_win_SchlangeNichtAusreichend(void){ + int realU[N][N] = {0}; + realU[15][5] = 15; + int result = win(realU); + + TEST_ASSERT_EQUAL_INT(0, result); +} void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ int realU[N][N]; realU[11][12] = 1;