diff --git a/build/test/cache/defines_dependency.yml b/build/test/cache/defines_dependency.yml index 9ac810c..df7f001 100644 --- a/build/test/cache/defines_dependency.yml +++ b/build/test/cache/defines_dependency.yml @@ -7,3 +7,5 @@ src/Spiellogik.c: - TEST src/Umgebung.c: - TEST +src/input.c: +- TEST diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c index e2ca8af..752ff9b 100644 --- a/build/test/cache/test_Spiellogik.c +++ b/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); } diff --git a/build/test/cache/test_input.c b/build/test/cache/test_input.c new file mode 100644 index 0000000..82131fa --- /dev/null +++ b/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); + +} diff --git a/build/test/dependencies/Spiellogik.d b/build/test/dependencies/Spiellogik.d index ed54659..f92a79d 100644 --- a/build/test/dependencies/Spiellogik.d +++ b/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 diff --git a/build/test/dependencies/input.d b/build/test/dependencies/input.d new file mode 100644 index 0000000..ff58562 --- /dev/null +++ b/build/test/dependencies/input.d @@ -0,0 +1 @@ +build/test/out/c/input.o: src/input.c diff --git a/build/test/dependencies/test_Spiellogik.d b/build/test/dependencies/test_Spiellogik.d index 8e19191..e460f5a 100644 --- a/build/test/dependencies/test_Spiellogik.d +++ b/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 diff --git a/build/test/dependencies/test_input.d b/build/test/dependencies/test_input.d new file mode 100644 index 0000000..1ae7e31 --- /dev/null +++ b/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 diff --git a/build/test/dependencies/test_input_runner.d b/build/test/dependencies/test_input_runner.d new file mode 100644 index 0000000..3591a81 --- /dev/null +++ b/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 diff --git a/build/test/out/c/Spiellogik.o b/build/test/out/c/Spiellogik.o index a135195..4db8c5e 100644 Binary files a/build/test/out/c/Spiellogik.o and b/build/test/out/c/Spiellogik.o differ diff --git a/build/test/out/c/Umgebung.o b/build/test/out/c/Umgebung.o index 5ebeb88..e36d2c9 100644 Binary files a/build/test/out/c/Umgebung.o and b/build/test/out/c/Umgebung.o differ diff --git a/build/test/out/c/input.o b/build/test/out/c/input.o new file mode 100644 index 0000000..bae0fea Binary files /dev/null and b/build/test/out/c/input.o differ diff --git a/build/test/out/c/probe.o b/build/test/out/c/probe.o index b27a82b..8a694bc 100644 Binary files a/build/test/out/c/probe.o and b/build/test/out/c/probe.o differ diff --git a/build/test/out/c/test_Spiellogik.o b/build/test/out/c/test_Spiellogik.o index 0dc3b6a..0611e1e 100644 Binary files a/build/test/out/c/test_Spiellogik.o and b/build/test/out/c/test_Spiellogik.o differ diff --git a/build/test/out/c/test_Spiellogik_runner.o b/build/test/out/c/test_Spiellogik_runner.o index 3a859ca..3866047 100644 Binary files a/build/test/out/c/test_Spiellogik_runner.o and b/build/test/out/c/test_Spiellogik_runner.o differ diff --git a/build/test/out/c/test_Umgebung.o b/build/test/out/c/test_Umgebung.o index 00758b9..c377678 100644 Binary files a/build/test/out/c/test_Umgebung.o and b/build/test/out/c/test_Umgebung.o differ diff --git a/build/test/out/c/test_Umgebung_runner.o b/build/test/out/c/test_Umgebung_runner.o index 6d164d4..ad305a4 100644 Binary files a/build/test/out/c/test_Umgebung_runner.o and b/build/test/out/c/test_Umgebung_runner.o differ diff --git a/build/test/out/c/test_input.o b/build/test/out/c/test_input.o new file mode 100644 index 0000000..2a3523c Binary files /dev/null and b/build/test/out/c/test_input.o differ diff --git a/build/test/out/c/test_input_runner.o b/build/test/out/c/test_input_runner.o new file mode 100644 index 0000000..083cd4c Binary files /dev/null and b/build/test/out/c/test_input_runner.o differ diff --git a/build/test/out/c/test_test.o b/build/test/out/c/test_test.o index 92a9d92..918600c 100644 Binary files a/build/test/out/c/test_test.o and b/build/test/out/c/test_test.o differ diff --git a/build/test/out/c/test_test_runner.o b/build/test/out/c/test_test_runner.o index eba08f5..485b491 100644 Binary files a/build/test/out/c/test_test_runner.o and b/build/test/out/c/test_test_runner.o differ diff --git a/build/test/out/test_Spiellogik.out b/build/test/out/test_Spiellogik.out index e871203..6a9df01 100755 Binary files a/build/test/out/test_Spiellogik.out and b/build/test/out/test_Spiellogik.out differ diff --git a/build/test/out/test_Umgebung.out b/build/test/out/test_Umgebung.out index a46e041..67ba68e 100755 Binary files a/build/test/out/test_Umgebung.out and b/build/test/out/test_Umgebung.out differ diff --git a/build/test/out/test_input.out b/build/test/out/test_input.out new file mode 100755 index 0000000..0febed6 Binary files /dev/null and b/build/test/out/test_input.out differ diff --git a/build/test/out/test_test.out b/build/test/out/test_test.out index 509234c..d090ea5 100755 Binary files a/build/test/out/test_test.out and b/build/test/out/test_test.out differ diff --git a/build/test/preprocess/files/test_Spiellogik.c b/build/test/preprocess/files/test_Spiellogik.c index e2ca8af..752ff9b 100644 --- a/build/test/preprocess/files/test_Spiellogik.c +++ b/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); } diff --git a/build/test/preprocess/files/test_input.c b/build/test/preprocess/files/test_input.c new file mode 100644 index 0000000..82131fa --- /dev/null +++ b/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); + +} diff --git a/build/test/preprocess/includes/test_Spiellogik.c b/build/test/preprocess/includes/test_Spiellogik.c index 9a06f7c..cefc393 100644 --- a/build/test/preprocess/includes/test_Spiellogik.c +++ b/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 diff --git a/build/test/preprocess/includes/test_input.c b/build/test/preprocess/includes/test_input.c new file mode 100644 index 0000000..ffbb02a --- /dev/null +++ b/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 diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass index 376aeb9..8dbcc5a 100644 --- a/build/test/results/test_Spiellogik.pass +++ b/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 diff --git a/build/test/results/test_Umgebung.pass b/build/test/results/test_Umgebung.pass index 17541d9..decd6a9 100644 --- a/build/test/results/test_Umgebung.pass +++ b/build/test/results/test_Umgebung.pass @@ -19,4 +19,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0011768759995902656 +:time: 0.0017714450004859827 diff --git a/build/test/results/test_input.pass b/build/test/results/test_input.pass new file mode 100644 index 0000000..4fb9273 --- /dev/null +++ b/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 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index e43737c..ffb42fc 100644 --- a/build/test/results/test_test.pass +++ b/build/test/results/test_test.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0012329210003372282 +:time: 0.003495516997645609 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c index 986fc0f..d7f1e13 100644 --- a/build/test/runners/test_Spiellogik_runner.c +++ b/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(); } diff --git a/build/test/runners/test_input_runner.c b/build/test/runners/test_input_runner.c new file mode 100644 index 0000000..bbbda97 --- /dev/null +++ b/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(); +} diff --git a/src/Main.o b/src/Main.o new file mode 100644 index 0000000..a5530df Binary files /dev/null and b/src/Main.o differ diff --git a/src/Move.c b/src/Move.c deleted file mode 100644 index 3b47a17..0000000 --- a/src/Move.c +++ /dev/null @@ -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 - -enum directions -{ - up, down, left, right, -}; - -uint16_t curDirections = left; - -void move(void) { - -} diff --git a/src/Spiellogik b/src/Spiellogik new file mode 100644 index 0000000..0f5b7ac Binary files /dev/null and b/src/Spiellogik differ diff --git a/src/Spiellogik.c b/src/Spiellogik.c index 72038d5..a2397e5 100644 --- a/src/Spiellogik.c +++ b/src/Spiellogik.c @@ -6,6 +6,7 @@ #include #include #include +#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; } } diff --git a/src/Spiellogik.h b/src/Spiellogik.h index 9b3120e..3321e43 100644 --- a/src/Spiellogik.h +++ b/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 \ No newline at end of file +#endif diff --git a/src/Spiellogik.o b/src/Spiellogik.o new file mode 100644 index 0000000..c34ce47 Binary files /dev/null and b/src/Spiellogik.o differ diff --git a/src/Umgebung.c b/src/Umgebung.c index 1505e0e..22c40ea 100644 --- a/src/Umgebung.c +++ b/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; } } } diff --git a/src/Umgebung.h b/src/Umgebung.h index 143eb00..224d2c3 100644 --- a/src/Umgebung.h +++ b/src/Umgebung.h @@ -1,4 +1,4 @@ -#include "unity.h" +//#include "unity.h" #define N 20 #ifndef UMGEBUNG_H #define UMGEBUNG_H @@ -12,4 +12,4 @@ int delay(int ms); void ASCI(); -#endif \ No newline at end of file +#endif diff --git a/src/Umgebung.o b/src/Umgebung.o new file mode 100644 index 0000000..e389f99 Binary files /dev/null and b/src/Umgebung.o differ diff --git a/src/input.o b/src/input.o new file mode 100644 index 0000000..775c02e Binary files /dev/null and b/src/input.o differ diff --git a/src/probe.o b/src/probe.o new file mode 100644 index 0000000..6f18ecc Binary files /dev/null and b/src/probe.o differ diff --git a/test/test_Spiellogik.c b/test/test_Spiellogik.c index 4759189..4067116 100644 --- a/test/test_Spiellogik.c +++ b/test/test_Spiellogik.c @@ -1,5 +1,6 @@ #include "unity.h" #include "Spiellogik.h" +#include "Umgebung.h" #include void setUp(void){ @@ -163,4 +164,4 @@ void test_lose_right_rechterRand(void){ int result = lose(realU, 'l'); TEST_ASSERT_EQUAL_INT(1, result); -} \ No newline at end of file +}