Browse Source

fixed compiling/testing error

main
fdai7184 2 years ago
parent
commit
8232d85a77
  1. 2
      build/test/cache/defines_dependency.yml
  2. 33
      build/test/cache/test_Spiellogik.c
  3. 123
      build/test/cache/test_input.c
  4. 4
      build/test/dependencies/Spiellogik.d
  5. 1
      build/test/dependencies/input.d
  6. 2
      build/test/dependencies/test_Spiellogik.d
  7. 4
      build/test/dependencies/test_input.d
  8. 4
      build/test/dependencies/test_input_runner.d
  9. BIN
      build/test/out/c/Spiellogik.o
  10. BIN
      build/test/out/c/Umgebung.o
  11. BIN
      build/test/out/c/input.o
  12. BIN
      build/test/out/c/probe.o
  13. BIN
      build/test/out/c/test_Spiellogik.o
  14. BIN
      build/test/out/c/test_Spiellogik_runner.o
  15. BIN
      build/test/out/c/test_Umgebung.o
  16. BIN
      build/test/out/c/test_Umgebung_runner.o
  17. BIN
      build/test/out/c/test_input.o
  18. BIN
      build/test/out/c/test_input_runner.o
  19. BIN
      build/test/out/c/test_test.o
  20. BIN
      build/test/out/c/test_test_runner.o
  21. BIN
      build/test/out/test_Spiellogik.out
  22. BIN
      build/test/out/test_Umgebung.out
  23. BIN
      build/test/out/test_input.out
  24. BIN
      build/test/out/test_test.out
  25. 33
      build/test/preprocess/files/test_Spiellogik.c
  26. 123
      build/test/preprocess/files/test_input.c
  27. 1
      build/test/preprocess/includes/test_Spiellogik.c
  28. 3
      build/test/preprocess/includes/test_input.c
  29. 34
      build/test/results/test_Spiellogik.pass
  30. 2
      build/test/results/test_Umgebung.pass
  31. 42
      build/test/results/test_input.pass
  32. 2
      build/test/results/test_test.pass
  33. 32
      build/test/runners/test_Spiellogik_runner.c
  34. 93
      build/test/runners/test_input_runner.c
  35. BIN
      src/Main.o
  36. 19
      src/Move.c
  37. BIN
      src/Spiellogik
  38. 11
      src/Spiellogik.c
  39. 4
      src/Spiellogik.h
  40. BIN
      src/Spiellogik.o
  41. 2
      src/Umgebung.c
  42. 2
      src/Umgebung.h
  43. BIN
      src/Umgebung.o
  44. BIN
      src/input.o
  45. BIN
      src/probe.o
  46. 1
      test/test_Spiellogik.c

2
build/test/cache/defines_dependency.yml

@ -7,3 +7,5 @@ src/Spiellogik.c:
- TEST
src/Umgebung.c:
- TEST
src/input.c:
- TEST

33
build/test/cache/test_Spiellogik.c

@ -1,3 +1,4 @@
#include "src/Umgebung.h"
#include "src/Spiellogik.h"
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
@ -30,7 +31,7 @@ void test_test1(void){
((void *)0)
), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(17), UNITY_DISPLAY_STYLE_INT);
}
@ -56,7 +57,7 @@ void test_win_SchlangegroesseAusreichend(void){
((void *)0)
), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT);
}
@ -78,7 +79,7 @@ void test_win_SchlangeNichtAusreichend(void){
((void *)0)
), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(37), UNITY_DISPLAY_STYLE_INT);
}
@ -96,7 +97,7 @@ void test_feldFrei_Verhalten_bei_belegtem_Feld(void){
((void *)0)
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(44), UNITY_DISPLAY_STYLE_INT);
}
@ -116,7 +117,7 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){
((void *)0)
), (UNITY_UINT)(51), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(52), UNITY_DISPLAY_STYLE_INT);
}
@ -142,7 +143,7 @@ void test_lose_up_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT);
}
@ -166,7 +167,7 @@ void test_lose_up_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(72), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT);
}
@ -190,7 +191,7 @@ void test_lose_up_Obererrand(void){
((void *)0)
), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(83), UNITY_DISPLAY_STYLE_INT);
}
@ -214,7 +215,7 @@ void test_lose_down_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(92), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(93), UNITY_DISPLAY_STYLE_INT);
}
@ -240,7 +241,7 @@ void test_lose_down_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT);
}
@ -264,7 +265,7 @@ void test_lose_left_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(113), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(114), UNITY_DISPLAY_STYLE_INT);
}
@ -290,7 +291,7 @@ void test_lose_left_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT);
}
@ -314,7 +315,7 @@ void test_lose_left_linkerRand(void){
((void *)0)
), (UNITY_UINT)(134), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(135), UNITY_DISPLAY_STYLE_INT);
}
@ -338,7 +339,7 @@ void test_lose_right_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(144), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(145), UNITY_DISPLAY_STYLE_INT);
}
@ -364,7 +365,7 @@ void test_lose_right_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(155), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(156), UNITY_DISPLAY_STYLE_INT);
}
@ -388,6 +389,6 @@ void test_lose_right_rechterRand(void){
((void *)0)
), (UNITY_UINT)(165), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(166), UNITY_DISPLAY_STYLE_INT);
}

123
build/test/cache/test_input.c

@ -0,0 +1,123 @@
#include "src/input.h"
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void){
}
void tearDown(void){
}
void test_testArrow(void){
char result = getTInput('\033');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('ar')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(18), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testw(void){
char result = getTInput('w');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('w')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testa(void){
char result = getTInput('a');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('a')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_CHAR);
}
void test_tests(void){
char result = getTInput('s');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('s')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(33), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testd(void){
char result = getTInput('d');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('d')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(38), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testq(void){
char result = getTInput('q');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('q')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testp(void){
char result = getTInput('p');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('p')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(48), UNITY_DISPLAY_STYLE_CHAR);
}

4
build/test/dependencies/Spiellogik.d

@ -1 +1,3 @@
build/test/out/c/Spiellogik.o: src/Spiellogik.c
build/test/out/c/Spiellogik.o: src/Spiellogik.c src/Umgebung.h \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h

1
build/test/dependencies/input.d

@ -0,0 +1 @@
build/test/out/c/input.o: src/input.c

2
build/test/dependencies/test_Spiellogik.d

@ -1,4 +1,4 @@
build/test/out/c/test_Spiellogik.o: test/test_Spiellogik.c \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \
src/Spiellogik.h
src/Spiellogik.h src/Umgebung.h

4
build/test/dependencies/test_input.d

@ -0,0 +1,4 @@
build/test/out/c/test_input.o: test/test_input.c \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \
src/input.h

4
build/test/dependencies/test_input_runner.d

@ -0,0 +1,4 @@
build/test/out/c/test_input_runner.o: \
build/test/runners/test_input_runner.c \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h

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

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

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

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

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

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

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

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

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

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

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

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

BIN
build/test/out/test_Spiellogik.out

BIN
build/test/out/test_Umgebung.out

BIN
build/test/out/test_input.out

BIN
build/test/out/test_test.out

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

@ -1,3 +1,4 @@
#include "src/Umgebung.h"
#include "src/Spiellogik.h"
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
@ -30,7 +31,7 @@ void test_test1(void){
((void *)0)
), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(17), UNITY_DISPLAY_STYLE_INT);
}
@ -56,7 +57,7 @@ void test_win_SchlangegroesseAusreichend(void){
((void *)0)
), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT);
}
@ -78,7 +79,7 @@ void test_win_SchlangeNichtAusreichend(void){
((void *)0)
), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(37), UNITY_DISPLAY_STYLE_INT);
}
@ -96,7 +97,7 @@ void test_feldFrei_Verhalten_bei_belegtem_Feld(void){
((void *)0)
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(44), UNITY_DISPLAY_STYLE_INT);
}
@ -116,7 +117,7 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){
((void *)0)
), (UNITY_UINT)(51), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(52), UNITY_DISPLAY_STYLE_INT);
}
@ -142,7 +143,7 @@ void test_lose_up_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT);
}
@ -166,7 +167,7 @@ void test_lose_up_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(72), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT);
}
@ -190,7 +191,7 @@ void test_lose_up_Obererrand(void){
((void *)0)
), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(83), UNITY_DISPLAY_STYLE_INT);
}
@ -214,7 +215,7 @@ void test_lose_down_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(92), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(93), UNITY_DISPLAY_STYLE_INT);
}
@ -240,7 +241,7 @@ void test_lose_down_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT);
}
@ -264,7 +265,7 @@ void test_lose_left_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(113), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(114), UNITY_DISPLAY_STYLE_INT);
}
@ -290,7 +291,7 @@ void test_lose_left_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT);
}
@ -314,7 +315,7 @@ void test_lose_left_linkerRand(void){
((void *)0)
), (UNITY_UINT)(134), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(135), UNITY_DISPLAY_STYLE_INT);
}
@ -338,7 +339,7 @@ void test_lose_right_freiesFeld(void){
((void *)0)
), (UNITY_UINT)(144), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(145), UNITY_DISPLAY_STYLE_INT);
}
@ -364,7 +365,7 @@ void test_lose_right_belegtesFeld(void){
((void *)0)
), (UNITY_UINT)(155), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(156), UNITY_DISPLAY_STYLE_INT);
}
@ -388,6 +389,6 @@ void test_lose_right_rechterRand(void){
((void *)0)
), (UNITY_UINT)(165), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(166), UNITY_DISPLAY_STYLE_INT);
}

123
build/test/preprocess/files/test_input.c

@ -0,0 +1,123 @@
#include "src/input.h"
#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void){
}
void tearDown(void){
}
void test_testArrow(void){
char result = getTInput('\033');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('ar')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(18), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testw(void){
char result = getTInput('w');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('w')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testa(void){
char result = getTInput('a');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('a')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_CHAR);
}
void test_tests(void){
char result = getTInput('s');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('s')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(33), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testd(void){
char result = getTInput('d');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('d')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(38), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testq(void){
char result = getTInput('q');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('q')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_CHAR);
}
void test_testp(void){
char result = getTInput('p');
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('p')), (UNITY_INT)(UNITY_INT8 )((result)), (
((void *)0)
), (UNITY_UINT)(48), UNITY_DISPLAY_STYLE_CHAR);
}

1
build/test/preprocess/includes/test_Spiellogik.c

@ -1,3 +1,4 @@
---
- "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
- src/Spiellogik.h
- src/Umgebung.h

3
build/test/preprocess/includes/test_input.c

@ -0,0 +1,3 @@
---
- "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
- src/input.h

34
build/test/results/test_Spiellogik.pass

@ -4,67 +4,67 @@
:file: test_Spiellogik.c
:successes:
- :test: test_test1
:line: 12
:line: 13
:message: ''
:unity_test_time: 0
- :test: test_win_SchlangegroesseAusreichend
:line: 22
:line: 23
:message: ''
:unity_test_time: 0
- :test: test_win_SchlangeNichtAusreichend
:line: 31
:line: 32
:message: ''
:unity_test_time: 0
- :test: test_feldFrei_Verhalten_bei_belegtem_Feld
:line: 38
:line: 39
:message: ''
:unity_test_time: 0
- :test: test_feldFrei_Verhalten_bei_freiem_Feld
:line: 46
:line: 47
:message: ''
:unity_test_time: 0
- :test: test_lose_up_freiesFeld
:line: 57
:line: 58
:message: ''
:unity_test_time: 0
- :test: test_lose_up_belegtesFeld
:line: 66
:line: 67
:message: ''
:unity_test_time: 0
- :test: test_lose_up_Obererrand
:line: 77
:line: 78
:message: ''
:unity_test_time: 0
- :test: test_lose_down_freiesFeld
:line: 87
:line: 88
:message: ''
:unity_test_time: 0
- :test: test_lose_down_belegtesFeld
:line: 97
:line: 98
:message: ''
:unity_test_time: 0
- :test: test_lose_left_freiesFeld
:line: 108
:line: 109
:message: ''
:unity_test_time: 0
- :test: test_lose_left_belegtesFeld
:line: 118
:line: 119
:message: ''
:unity_test_time: 0
- :test: test_lose_left_linkerRand
:line: 129
:line: 130
:message: ''
:unity_test_time: 0
- :test: test_lose_right_freiesFeld
:line: 139
:line: 140
:message: ''
:unity_test_time: 0
- :test: test_lose_right_belegtesFeld
:line: 149
:line: 150
:message: ''
:unity_test_time: 0
- :test: test_lose_right_rechterRand
:line: 160
:line: 161
:message: ''
:unity_test_time: 0
:failures: []
@ -75,4 +75,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.001048741998602054
:time: 0.0016252339992206544

2
build/test/results/test_Umgebung.pass

@ -19,4 +19,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0011768759995902656
:time: 0.0017714450004859827

42
build/test/results/test_input.pass

@ -0,0 +1,42 @@
---
:source:
:path: test
:file: test_input.c
:successes:
- :test: test_testArrow
:line: 14
:message: ''
:unity_test_time: 0
- :test: test_testw
:line: 21
:message: ''
:unity_test_time: 0
- :test: test_testa
:line: 26
:message: ''
:unity_test_time: 0
- :test: test_tests
:line: 31
:message: ''
:unity_test_time: 0
- :test: test_testd
:line: 36
:message: ''
:unity_test_time: 0
- :test: test_testq
:line: 41
:message: ''
:unity_test_time: 0
- :test: test_testp
:line: 46
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 7
:passed: 7
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0016068740005721338

2
build/test/results/test_test.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0012329210003372282
:time: 0.003495516997645609

32
build/test/runners/test_Spiellogik_runner.c

@ -90,22 +90,22 @@ static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE l
int main(void)
{
UnityBegin("test_Spiellogik.c");
run_test(test_test1, "test_test1", 12);
run_test(test_win_SchlangegroesseAusreichend, "test_win_SchlangegroesseAusreichend", 22);
run_test(test_win_SchlangeNichtAusreichend, "test_win_SchlangeNichtAusreichend", 31);
run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 38);
run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 46);
run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 57);
run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 66);
run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 77);
run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 87);
run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 97);
run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 108);
run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 118);
run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 129);
run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 139);
run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 149);
run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 160);
run_test(test_test1, "test_test1", 13);
run_test(test_win_SchlangegroesseAusreichend, "test_win_SchlangegroesseAusreichend", 23);
run_test(test_win_SchlangeNichtAusreichend, "test_win_SchlangeNichtAusreichend", 32);
run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 39);
run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 47);
run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 58);
run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 67);
run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 78);
run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 88);
run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 98);
run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 109);
run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 119);
run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 130);
run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 140);
run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 150);
run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 161);
return UnityEnd();
}

93
build/test/runners/test_input_runner.c

@ -0,0 +1,93 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */
/*=======Automagically Detected Files To Include=====*/
#include "unity.h"
int GlobalExpectCount;
int GlobalVerifyOrder;
char* GlobalOrderError;
/*=======External Functions This Runner Calls=====*/
extern void setUp(void);
extern void tearDown(void);
extern void test_testArrow(void);
extern void test_testw(void);
extern void test_testa(void);
extern void test_tests(void);
extern void test_testd(void);
extern void test_testq(void);
extern void test_testp(void);
/*=======Mock Management=====*/
static void CMock_Init(void)
{
GlobalExpectCount = 0;
GlobalVerifyOrder = 0;
GlobalOrderError = NULL;
}
static void CMock_Verify(void)
{
}
static void CMock_Destroy(void)
{
}
/*=======Test Reset Options=====*/
void resetTest(void);
void resetTest(void)
{
tearDown();
CMock_Verify();
CMock_Destroy();
CMock_Init();
setUp();
}
void verifyTest(void);
void verifyTest(void)
{
CMock_Verify();
}
/*=======Test Runner Used To Run Each Test=====*/
static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
{
Unity.CurrentTestName = name;
Unity.CurrentTestLineNumber = line_num;
#ifdef UNITY_USE_COMMAND_LINE_ARGS
if (!UnityTestMatches())
return;
#endif
Unity.NumberOfTests++;
UNITY_CLR_DETAILS();
UNITY_EXEC_TIME_START();
CMock_Init();
if (TEST_PROTECT())
{
setUp();
func();
}
if (TEST_PROTECT())
{
tearDown();
CMock_Verify();
}
CMock_Destroy();
UNITY_EXEC_TIME_STOP();
UnityConcludeTest();
}
/*=======MAIN=====*/
int main(void)
{
UnityBegin("test_input.c");
run_test(test_testArrow, "test_testArrow", 14);
run_test(test_testw, "test_testw", 21);
run_test(test_testa, "test_testa", 26);
run_test(test_tests, "test_tests", 31);
run_test(test_testd, "test_testd", 36);
run_test(test_testq, "test_testq", 41);
run_test(test_testp, "test_testp", 46);
return UnityEnd();
}

BIN
src/Main.o

19
src/Move.c

@ -1,19 +0,0 @@
#define _CRT_SECURE_NO_WARNINGS
#define re return
#define s 10
#define up 'w'
#define down 's'
#define right 'd'
#define left 'a'
#include<stdio.h>
enum directions
{
up, down, left, right,
};
uint16_t curDirections = left;
void move(void) {
}

BIN
src/Spiellogik

11
src/Spiellogik.c

@ -6,6 +6,7 @@
#include<stdlib.h>
#include<time.h>
#include<stdbool.h>
#include "Umgebung.h"
int speed = 0;
@ -90,7 +91,7 @@ int update(int realU[N][N],char richtung) {
}
if(realU[ii + 1] [jj] == (N * N) + 1) {
realU[ii + 1] [jj] = groesste + 1;
apple(realU);
Apfel(realU);
speed = speed + 20;
}
else {
@ -115,7 +116,7 @@ int update(int realU[N][N],char richtung) {
}
if (realU[ii + 1][jj] == (N * N) + 1) {
realU[ii + 1][jj] = groesste + 1;
apple(realU);
Apfel(realU);
speed = speed + 20;
}
else {
@ -140,7 +141,7 @@ int update(int realU[N][N],char richtung) {
}
if (realU[ii][jj - 1] == (N * N) + 1) {
realU[ii][jj - 1] = groesste + 1;
apple(realU);
Apfel(realU);
speed = speed + 20;
}
else {
@ -165,7 +166,7 @@ int update(int realU[N][N],char richtung) {
}
if (realU[ii][jj + 1] == (N * N) + 1) {
realU[ii][jj + 1] = groesste + 1;
apple(realU);
Apfel(realU);
speed = speed + 20;
}
else {
@ -187,7 +188,7 @@ int update(int realU[N][N],char richtung) {
if (win(realU)) {
re 1;
} else {
print(realU);
Umgebung(realU);
return 0;
}
}

4
src/Spiellogik.h

@ -1,4 +1,4 @@
#include "unity.h"
//#include "unity.h"
#ifndef PROBE_H
#define PROBE_H
#define N 20
@ -7,5 +7,7 @@ int probe(int input);
int win(int realU[N][N]);
int feldFrei(int realU[N][N], int ii, int jj);
int lose(int realU[N][N], char richtung);
void Apfel(int realU[N][N]);
void Umgebung(int str[N][N]);
#endif

BIN
src/Spiellogik.o

2
src/Umgebung.c

@ -145,7 +145,7 @@ void Apfel(int realU[N][N]){
jj=rand() % N;
if(realU[ii][jj]==0){
realU[ii][jj]=(N*N)+1;
re;
return;
}
}
}

2
src/Umgebung.h

@ -1,4 +1,4 @@
#include "unity.h"
//#include "unity.h"
#define N 20
#ifndef UMGEBUNG_H
#define UMGEBUNG_H

BIN
src/Umgebung.o

BIN
src/input.o

BIN
src/probe.o

1
test/test_Spiellogik.c

@ -1,5 +1,6 @@
#include "unity.h"
#include "Spiellogik.h"
#include "Umgebung.h"
#include <stdlib.h>
void setUp(void){

Loading…
Cancel
Save