diff --git a/build/test/cache/test_Moving.c b/build/test/cache/test_Moving.c index d974b57..ae57173 100644 --- a/build/test/cache/test_Moving.c +++ b/build/test/cache/test_Moving.c @@ -48,17 +48,21 @@ void test_Bauern_bewegen(void) { - UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[0][2])), ( + print_Schachfeld(brett,8,8); + + + + UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[2][0])), ( ((void *)0) - ), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); - UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[0][1])), ( + UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[1][0])), ( ((void *)0) - ), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(29), UNITY_DISPLAY_STYLE_INT); diff --git a/build/test/out/c/Moving.o b/build/test/out/c/Moving.o index 9141142..8db122b 100644 Binary files a/build/test/out/c/Moving.o and b/build/test/out/c/Moving.o differ diff --git a/build/test/out/c/test_Moving.o b/build/test/out/c/test_Moving.o index ed25842..19686d2 100644 Binary files a/build/test/out/c/test_Moving.o and b/build/test/out/c/test_Moving.o differ diff --git a/build/test/out/test_Moving.out b/build/test/out/test_Moving.out index b16863e..f5f2993 100644 Binary files a/build/test/out/test_Moving.out and b/build/test/out/test_Moving.out differ diff --git a/build/test/preprocess/files/test_Moving.c b/build/test/preprocess/files/test_Moving.c index d974b57..ae57173 100644 --- a/build/test/preprocess/files/test_Moving.c +++ b/build/test/preprocess/files/test_Moving.c @@ -48,17 +48,21 @@ void test_Bauern_bewegen(void) { - UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[0][2])), ( + print_Schachfeld(brett,8,8); + + + + UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[2][0])), ( ((void *)0) - ), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); - UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[0][1])), ( + UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[1][0])), ( ((void *)0) - ), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(29), UNITY_DISPLAY_STYLE_INT); diff --git a/build/test/results/test_Input.pass b/build/test/results/test_Input.pass index a648d34..67b1946 100644 --- a/build/test/results/test_Input.pass +++ b/build/test/results/test_Input.pass @@ -16,4 +16,4 @@ :ignored: 0 :stdout: - "-> " -:time: 0.035566499980632216 +:time: 0.05769519996829331 diff --git a/build/test/results/test_Moving.pass b/build/test/results/test_Moving.pass index 599e3d0..6ccba66 100644 --- a/build/test/results/test_Moving.pass +++ b/build/test/results/test_Moving.pass @@ -14,5 +14,13 @@ :passed: 1 :failed: 0 :ignored: 0 -:stdout: [] -:time: 0.032800800050608814 +:stdout: +- " R N B Q K B N R " +- " P P P P P P P " +- " P " +- " " +- " " +- " " +- " p p p p p p p p " +- " r n b q k b n r " +:time: 0.06610940000973642 diff --git a/build/test/results/test_Schachbrett.pass b/build/test/results/test_Schachbrett.pass index 28ad2b5..1217230 100644 --- a/build/test/results/test_Schachbrett.pass +++ b/build/test/results/test_Schachbrett.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.033765100000891834 +:time: 0.0358981000026688 diff --git a/src/Moving.c b/src/Moving.c index a89af87..a3efd61 100644 --- a/src/Moving.c +++ b/src/Moving.c @@ -17,7 +17,7 @@ void machezug(char** Brett, int startX, int startY, int endX, int endY,Player pl //wenn istzugerlaubt true ist wird das hier ausgeführt if(istzugerlaubt(Brett,startX,startY,endX,endY,player) == true){ - Brett[endX][endY] = Brett[startY][startX]; - Brett[startX][startY] = ' '; + Brett[endY][endX] = Brett[startY][startX]; + Brett[startY][startX] = ' '; } } diff --git a/test/test_Moving.c b/test/test_Moving.c index 630830c..d5dfc60 100644 --- a/test/test_Moving.c +++ b/test/test_Moving.c @@ -23,8 +23,10 @@ void test_Bauern_bewegen(void) { machezug( brett, startX, startY, endX, endY, player); - TEST_ASSERT_EQUAL('P', brett[0][2]); - TEST_ASSERT_EQUAL(' ', brett[0][1]); + print_Schachfeld(brett,8,8); + + TEST_ASSERT_EQUAL('P', brett[2][0]); + TEST_ASSERT_EQUAL(' ', brett[1][0]); for (int i = 0; i < 8; i++) {