Browse Source

Unittest lose(down + belegtes Feld)

main
Jannis 2 years ago
parent
commit
843866621f
  1. 22
      build/test/cache/test_Spiellogik.c
  2. BIN
      build/test/out/c/test_Spiellogik.o
  3. BIN
      build/test/out/c/test_Spiellogik_runner.o
  4. BIN
      build/test/out/test_Spiellogik.out
  5. 22
      build/test/preprocess/files/test_Spiellogik.c
  6. 10
      build/test/results/test_Spiellogik.pass
  7. 2
      build/test/results/test_Umgebung.pass
  8. 2
      build/test/results/test_test.pass
  9. 2
      build/test/runners/test_Spiellogik_runner.c
  10. 9
      test/test_Spiellogik.c

22
build/test/cache/test_Spiellogik.c

@ -159,3 +159,25 @@ void test_lose_down_freiesFeld(void){
), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_down_belegtesFeld(void){
int realU[20][20] = { 0 };
realU[10][12] = 4;
realU[11][12] = 3;
int result = lose(realU, 'd');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT);
}

BIN
build/test/out/c/test_Spiellogik.o

BIN
build/test/out/c/test_Spiellogik_runner.o

BIN
build/test/out/test_Spiellogik.out

22
build/test/preprocess/files/test_Spiellogik.c

@ -159,3 +159,25 @@ void test_lose_down_freiesFeld(void){
), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_down_belegtesFeld(void){
int realU[20][20] = { 0 };
realU[10][12] = 4;
realU[11][12] = 3;
int result = lose(realU, 'd');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT);
}

10
build/test/results/test_Spiellogik.pass

@ -31,12 +31,16 @@
:line: 62 :line: 62
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_down_belegtesFeld
:line: 70
:message: ''
:unity_test_time: 0
:failures: [] :failures: []
:ignores: [] :ignores: []
:counts: :counts:
:total: 7
:passed: 7
:total: 8
:passed: 8
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0018421029999444727
:time: 0.0012350200004220824

2
build/test/results/test_Umgebung.pass

@ -19,4 +19,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.001862872999481624
:time: 0.0015680600008636247

2
build/test/results/test_test.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0018331499995838385
:time: 0.0035386119998292997

2
build/test/runners/test_Spiellogik_runner.c

@ -17,6 +17,7 @@ extern void test_lose_up_freiesFeld(void);
extern void test_lose_up_belegtesFeld(void); extern void test_lose_up_belegtesFeld(void);
extern void test_lose_up_Obererrand(void); extern void test_lose_up_Obererrand(void);
extern void test_lose_down_freiesFeld(void); extern void test_lose_down_freiesFeld(void);
extern void test_lose_down_belegtesFeld(void);
/*=======Mock Management=====*/ /*=======Mock Management=====*/
@ -88,6 +89,7 @@ int main(void)
run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 44); run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 44);
run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 53); run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 53);
run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 62); run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 62);
run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 70);
return UnityEnd(); return UnityEnd();
} }

9
test/test_Spiellogik.c

@ -66,3 +66,12 @@ void test_lose_down_freiesFeld(void){
TEST_ASSERT_EQUAL_INT(0, result); TEST_ASSERT_EQUAL_INT(0, result);
} }
void test_lose_down_belegtesFeld(void){
int realU[20][20] = { 0 };
realU[10][12] = 4;
realU[11][12] = 3;
int result = lose(realU, 'd');
TEST_ASSERT_EQUAL_INT(1, result);
}
Loading…
Cancel
Save