Browse Source

Setup Unittest Funktion win

main
Jannis 2 years ago
parent
commit
0f2143cd49
  1. 58
      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. 58
      build/test/preprocess/files/test_Spiellogik.c
  6. 24
      build/test/results/test_Spiellogik.pass
  7. 2
      build/test/results/test_Umgebung.pass
  8. 2
      build/test/results/test_test.pass
  9. 22
      build/test/runners/test_Spiellogik_runner.c
  10. 1
      src/Spiellogik.h

58
build/test/cache/test_Spiellogik.c

@ -78,6 +78,10 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){
void test_lose_up_freiesFeld(void){ void test_lose_up_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -92,12 +96,14 @@ void test_lose_up_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(41), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_up_belegtesFeld(void){ void test_lose_up_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -114,12 +120,16 @@ void test_lose_up_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_up_Obererrand(void){ void test_lose_up_Obererrand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -134,7 +144,7 @@ void test_lose_up_Obererrand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(58), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT);
} }
@ -142,6 +152,8 @@ void test_lose_up_Obererrand(void){
void test_lose_down_freiesFeld(void){ void test_lose_down_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -156,12 +168,16 @@ void test_lose_down_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_down_belegtesFeld(void){ void test_lose_down_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -178,7 +194,7 @@ void test_lose_down_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT);
} }
@ -202,12 +218,16 @@ void test_lose_left_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(86), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_left_belegtesFeld(void){ void test_lose_left_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -224,12 +244,16 @@ void test_lose_left_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_left_linkerRand(void){ void test_lose_left_linkerRand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -244,7 +268,7 @@ void test_lose_left_linkerRand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(115), UNITY_DISPLAY_STYLE_INT);
} }
@ -252,6 +276,8 @@ void test_lose_left_linkerRand(void){
void test_lose_right_freiesFeld(void){ void test_lose_right_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -266,12 +292,16 @@ void test_lose_right_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_belegtesFeld(void){ void test_lose_right_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -288,10 +318,16 @@ void test_lose_right_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_rechterRand(void){ void test_lose_right_rechterRand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -306,6 +342,6 @@ void test_lose_right_rechterRand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(128), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(146), 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

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

@ -78,6 +78,10 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){
void test_lose_up_freiesFeld(void){ void test_lose_up_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -92,12 +96,14 @@ void test_lose_up_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(41), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_up_belegtesFeld(void){ void test_lose_up_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -114,12 +120,16 @@ void test_lose_up_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_up_Obererrand(void){ void test_lose_up_Obererrand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -134,7 +144,7 @@ void test_lose_up_Obererrand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(58), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT);
} }
@ -142,6 +152,8 @@ void test_lose_up_Obererrand(void){
void test_lose_down_freiesFeld(void){ void test_lose_down_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -156,12 +168,16 @@ void test_lose_down_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_down_belegtesFeld(void){ void test_lose_down_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -178,7 +194,7 @@ void test_lose_down_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT);
} }
@ -202,12 +218,16 @@ void test_lose_left_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(86), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_left_belegtesFeld(void){ void test_lose_left_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -224,12 +244,16 @@ void test_lose_left_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_left_linkerRand(void){ void test_lose_left_linkerRand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -244,7 +268,7 @@ void test_lose_left_linkerRand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(115), UNITY_DISPLAY_STYLE_INT);
} }
@ -252,6 +276,8 @@ void test_lose_left_linkerRand(void){
void test_lose_right_freiesFeld(void){ void test_lose_right_freiesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -266,12 +292,16 @@ void test_lose_right_freiesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_belegtesFeld(void){ void test_lose_right_belegtesFeld(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -288,10 +318,16 @@ void test_lose_right_belegtesFeld(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT);
} }
void test_lose_right_rechterRand(void){ void test_lose_right_rechterRand(void){
int realU[20][20] = { 0 }; int realU[20][20] = { 0 };
@ -306,6 +342,6 @@ void test_lose_right_rechterRand(void){
((void *)0) ((void *)0)
), (UNITY_UINT)(128), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(146), UNITY_DISPLAY_STYLE_INT);
} }

24
build/test/results/test_Spiellogik.pass

@ -16,47 +16,47 @@
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_up_freiesFeld - :test: test_lose_up_freiesFeld
:line: 36
:line: 38
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_up_belegtesFeld - :test: test_lose_up_belegtesFeld
:line: 44
:line: 47
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_up_Obererrand - :test: test_lose_up_Obererrand
:line: 53
:line: 58
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_down_freiesFeld - :test: test_lose_down_freiesFeld
:line: 62
:line: 68
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_down_belegtesFeld - :test: test_lose_down_belegtesFeld
:line: 70
:line: 78
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_left_freiesFeld - :test: test_lose_left_freiesFeld
:line: 81
:line: 89
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_left_belegtesFeld - :test: test_lose_left_belegtesFeld
:line: 89
:line: 99
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_left_linkerRand - :test: test_lose_left_linkerRand
:line: 98
:line: 110
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_right_freiesFeld - :test: test_lose_right_freiesFeld
:line: 107
:line: 120
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_right_belegtesFeld - :test: test_lose_right_belegtesFeld
:line: 115
:line: 130
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_lose_right_rechterRand - :test: test_lose_right_rechterRand
:line: 123
:line: 141
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
:failures: [] :failures: []
@ -67,4 +67,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0020299840016377857
:time: 0.000997625000309199

2
build/test/results/test_Umgebung.pass

@ -19,4 +19,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0014718490001541795
:time: 0.0012777290012309095

2
build/test/results/test_test.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0013736040000367211
:time: 0.0011423740015743533

22
build/test/runners/test_Spiellogik_runner.c

@ -91,17 +91,17 @@ int main(void)
run_test(test_test1, "test_test1", 12); run_test(test_test1, "test_test1", 12);
run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 19); run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 19);
run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 27); run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 27);
run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 36);
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_down_freiesFeld, "test_lose_down_freiesFeld", 62);
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);
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_rechterRand, "test_lose_right_rechterRand", 123);
run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 38);
run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 47);
run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 58);
run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 68);
run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 78);
run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 89);
run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 99);
run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 110);
run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 120);
run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 130);
run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 141);
return UnityEnd(); return UnityEnd();
} }

1
src/Spiellogik.h

@ -4,6 +4,7 @@
#define N 20 #define N 20
int probe(int input); int probe(int input);
int win(realU[N][N]);
int feldFrei(int realU[N][N], int ii, int jj); int feldFrei(int realU[N][N], int ii, int jj);
int lose(int realU[N][N], char richtung); int lose(int realU[N][N], char richtung);
Loading…
Cancel
Save