Browse Source

Unittest lose(right + rechter Rand)

main
Jannis 2 years ago
parent
commit
32b9416c4b
  1. 18
      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. 18
      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. 7
      test/test_Spiellogik.c

18
build/test/cache/test_Spiellogik.c

@ -291,3 +291,21 @@ void test_lose_right_belegtesFeld(void){
), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_rechterRand(void){
int realU[20][20] = { 0 };
realU[5][20] = 4;
int result = lose(realU, 'l');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(128), 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

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

@ -291,3 +291,21 @@ void test_lose_right_belegtesFeld(void){
), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_rechterRand(void){
int realU[20][20] = { 0 };
realU[5][20] = 4;
int result = lose(realU, 'l');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(128), UNITY_DISPLAY_STYLE_INT);
}

10
build/test/results/test_Spiellogik.pass

@ -55,12 +55,16 @@
:line: 115 :line: 115
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_right_rechterRand
:line: 123
:message: ''
:unity_test_time: 0
:failures: [] :failures: []
:ignores: [] :ignores: []
:counts: :counts:
:total: 13
:passed: 13
:total: 14
:passed: 14
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0014685070000268752
:time: 0.001713458999802242

2
build/test/results/test_Umgebung.pass

@ -19,4 +19,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.001630110999030876
:time: 0.00175995899917325

2
build/test/results/test_test.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0015618119996361202
:time: 0.0014771749993087724

2
build/test/runners/test_Spiellogik_runner.c

@ -23,6 +23,7 @@ extern void test_lose_left_belegtesFeld(void);
extern void test_lose_left_linkerRand(void); extern void test_lose_left_linkerRand(void);
extern void test_lose_right_freiesFeld(void); extern void test_lose_right_freiesFeld(void);
extern void test_lose_right_belegtesFeld(void); extern void test_lose_right_belegtesFeld(void);
extern void test_lose_right_rechterRand(void);
/*=======Mock Management=====*/ /*=======Mock Management=====*/
@ -100,6 +101,7 @@ int main(void)
run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 98); 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_freiesFeld, "test_lose_right_freiesFeld", 107);
run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 115); run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 115);
run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 123);
return UnityEnd(); return UnityEnd();
} }

7
test/test_Spiellogik.c

@ -120,3 +120,10 @@ void test_lose_right_belegtesFeld(void){
TEST_ASSERT_EQUAL_INT(1, result); TEST_ASSERT_EQUAL_INT(1, result);
} }
void test_lose_right_rechterRand(void){
int realU[20][20] = { 0 };
realU[5][N] = 4;
int result = lose(realU, 'l');
TEST_ASSERT_EQUAL_INT(1, result);
}
Loading…
Cancel
Save