diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c index 36cf2f8..460cbc4 100644 --- a/build/test/cache/test_Spiellogik.c +++ b/build/test/cache/test_Spiellogik.c @@ -247,3 +247,47 @@ void test_lose_left_linkerRand(void){ ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); } + + + + + +void test_lose_right_freiesFeld(void){ + + int realU[20][20] = { 0 }; + + realU[5][12] = 4; + + int result = lose(realU, 'r'); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_lose_right_belegtesFeld(void){ + + int realU[20][20] = { 0 }; + + realU[5][12] = 4; + + realU[5][13] = 3; + + int result = lose(realU, 'r'); + + + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_Spiellogik.o b/build/test/out/c/test_Spiellogik.o index d97b5a7..7998dc5 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 a378760..d883fc0 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 8917992..9f84319 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 36cf2f8..460cbc4 100644 --- a/build/test/preprocess/files/test_Spiellogik.c +++ b/build/test/preprocess/files/test_Spiellogik.c @@ -247,3 +247,47 @@ void test_lose_left_linkerRand(void){ ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); } + + + + + +void test_lose_right_freiesFeld(void){ + + int realU[20][20] = { 0 }; + + realU[5][12] = 4; + + int result = lose(realU, 'r'); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_lose_right_belegtesFeld(void){ + + int realU[20][20] = { 0 }; + + realU[5][12] = 4; + + realU[5][13] = 3; + + int result = lose(realU, 'r'); + + + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass index 3925183..4b32173 100644 --- a/build/test/results/test_Spiellogik.pass +++ b/build/test/results/test_Spiellogik.pass @@ -47,12 +47,20 @@ :line: 98 :message: '' :unity_test_time: 0 +- :test: test_lose_right_freiesFeld + :line: 107 + :message: '' + :unity_test_time: 0 +- :test: test_lose_right_belegtesFeld + :line: 115 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 11 - :passed: 11 + :total: 13 + :passed: 13 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.001419748999978765 +:time: 0.0014685070000268752 diff --git a/build/test/results/test_Umgebung.pass b/build/test/results/test_Umgebung.pass index 6b29c35..cbaef3b 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.0015369510001619346 +:time: 0.001630110999030876 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index 5f70c5d..fffc7ac 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.0011366079997969791 +:time: 0.0015618119996361202 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c index a1b48b6..95f4998 100644 --- a/build/test/runners/test_Spiellogik_runner.c +++ b/build/test/runners/test_Spiellogik_runner.c @@ -21,6 +21,8 @@ extern void test_lose_down_belegtesFeld(void); extern void test_lose_left_freiesFeld(void); extern void test_lose_left_belegtesFeld(void); extern void test_lose_left_linkerRand(void); +extern void test_lose_right_freiesFeld(void); +extern void test_lose_right_belegtesFeld(void); /*=======Mock Management=====*/ @@ -96,6 +98,8 @@ int main(void) run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 81); run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 89); run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 98); + run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 107); + run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 115); return UnityEnd(); } diff --git a/test/test_Spiellogik.c b/test/test_Spiellogik.c index 2cc5426..5d99f7c 100644 --- a/test/test_Spiellogik.c +++ b/test/test_Spiellogik.c @@ -110,4 +110,13 @@ void test_lose_right_freiesFeld(void){ int result = lose(realU, 'r'); TEST_ASSERT_EQUAL_INT(0, result); +} + +void test_lose_right_belegtesFeld(void){ + int realU[20][20] = { 0 }; + realU[5][12] = 4; + realU[5][13] = 3; + int result = lose(realU, 'r'); + + TEST_ASSERT_EQUAL_INT(1, result); } \ No newline at end of file