Browse Source

Unitest lose(left + linker Rand)

main
Jannis 2 years ago
parent
commit
8927cd341e
  1. 20
      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. 20
      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. 8
      test/test_Spiellogik.c

20
build/test/cache/test_Spiellogik.c

@ -227,3 +227,23 @@ void test_lose_left_belegtesFeld(void){
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
}
void test_lose_left_linkerRand(void){
int realU[20][20] = { 0 };
realU[5][0] = 4;
int result = lose(realU, 'l');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(103), 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

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

@ -227,3 +227,23 @@ void test_lose_left_belegtesFeld(void){
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
}
void test_lose_left_linkerRand(void){
int realU[20][20] = { 0 };
realU[5][0] = 4;
int result = lose(realU, 'l');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT);
}

10
build/test/results/test_Spiellogik.pass

@ -43,12 +43,16 @@
:line: 89
:message: ''
:unity_test_time: 0
- :test: test_lose_left_linkerRand
:line: 98
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 10
:passed: 10
:total: 11
:passed: 11
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0015318690002459334
:time: 0.00140369600012491

2
build/test/results/test_Umgebung.pass

@ -19,4 +19,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0016317859999617212
:time: 0.0016821500003061374

2
build/test/results/test_test.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0015538339994236594
:time: 0.0015225039996948908

2
build/test/runners/test_Spiellogik_runner.c

@ -20,6 +20,7 @@ extern void test_lose_down_freiesFeld(void);
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);
/*=======Mock Management=====*/
@ -94,6 +95,7 @@ int main(void)
run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 70);
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);
return UnityEnd();
}

8
test/test_Spiellogik.c

@ -94,3 +94,11 @@ void test_lose_left_belegtesFeld(void){
TEST_ASSERT_EQUAL_INT(1, result);
}
void test_lose_left_linkerRand(void){
int realU[20][20] = { 0 };
realU[5][0] = 4;
int result = lose(realU, 'l');
TEST_ASSERT_EQUAL_INT(1, result);
}
Loading…
Cancel
Save