diff --git a/build/test/cache/defines_dependency.yml b/build/test/cache/defines_dependency.yml index 2fbf0ff..536e4e8 100644 --- a/build/test/cache/defines_dependency.yml +++ b/build/test/cache/defines_dependency.yml @@ -1 +1,3 @@ ---- {} +--- +src/casualQuiz.c: +- TEST diff --git a/build/test/cache/test_casualQuiz.c b/build/test/cache/test_casualQuiz.c index e69de29..6c5d620 100644 --- a/build/test/cache/test_casualQuiz.c +++ b/build/test/cache/test_casualQuiz.c @@ -0,0 +1,55 @@ +#include "src/casualQuiz.h" +#include "C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + + + + + +void setUp(void) { + + + +} + + + + + +void tearDown(void) { + + + +} + + + +void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){ + + int TESTeingabe = 1; + + int TESTindex = 0; + + int TESTrichtige_antwort[]={1}; + + + + _Bool + + testfall; + + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + + + + do {if ((testfall == + + 1 + + )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(25)));}} while(0); + + + +} diff --git a/build/test/dependencies/casualQuiz.d b/build/test/dependencies/casualQuiz.d new file mode 100644 index 0000000..6e03f94 --- /dev/null +++ b/build/test/dependencies/casualQuiz.d @@ -0,0 +1 @@ +build/test/out/c/casualQuiz.o: src/casualQuiz.c src/casualQuiz.h diff --git a/build/test/dependencies/test_casualQuiz.d b/build/test/dependencies/test_casualQuiz.d index 5256c22..46d3784 100644 --- a/build/test/dependencies/test_casualQuiz.d +++ b/build/test/dependencies/test_casualQuiz.d @@ -1 +1,4 @@ -build/test/out/c/test_casualQuiz.o: test/test_casualQuiz.c +build/test/out/c/test_casualQuiz.o: test/test_casualQuiz.c \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ + src/casualQuiz.h diff --git a/build/test/out/c/casualQuiz.o b/build/test/out/c/casualQuiz.o new file mode 100644 index 0000000..9c6495e Binary files /dev/null and b/build/test/out/c/casualQuiz.o differ diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index fbd3539..5a6b6a1 100644 Binary files a/build/test/out/c/test_casualQuiz.o and b/build/test/out/c/test_casualQuiz.o differ diff --git a/build/test/out/c/test_casualQuiz_runner.o b/build/test/out/c/test_casualQuiz_runner.o index 7f509af..d024caf 100644 Binary files a/build/test/out/c/test_casualQuiz_runner.o and b/build/test/out/c/test_casualQuiz_runner.o differ diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index 1977a89..2e1e40e 100755 Binary files a/build/test/out/test_casualQuiz.out and b/build/test/out/test_casualQuiz.out differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index 8ddd540..da47e0a 100755 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/out/test_timequiz.out b/build/test/out/test_timequiz.out index 8854777..3ea79b3 100755 Binary files a/build/test/out/test_timequiz.out and b/build/test/out/test_timequiz.out differ diff --git a/build/test/out/test_wwm.out b/build/test/out/test_wwm.out index 38e54ee..93d60d9 100755 Binary files a/build/test/out/test_wwm.out and b/build/test/out/test_wwm.out differ diff --git a/build/test/preprocess/files/test_casualQuiz.c b/build/test/preprocess/files/test_casualQuiz.c index e69de29..6c5d620 100644 --- a/build/test/preprocess/files/test_casualQuiz.c +++ b/build/test/preprocess/files/test_casualQuiz.c @@ -0,0 +1,55 @@ +#include "src/casualQuiz.h" +#include "C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + + + + + +void setUp(void) { + + + +} + + + + + +void tearDown(void) { + + + +} + + + +void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){ + + int TESTeingabe = 1; + + int TESTindex = 0; + + int TESTrichtige_antwort[]={1}; + + + + _Bool + + testfall; + + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + + + + do {if ((testfall == + + 1 + + )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(25)));}} while(0); + + + +} diff --git a/build/test/preprocess/includes/test_casualQuiz.c b/build/test/preprocess/includes/test_casualQuiz.c index dcd024e..70d919b 100644 --- a/build/test/preprocess/includes/test_casualQuiz.c +++ b/build/test/preprocess/includes/test_casualQuiz.c @@ -1 +1,3 @@ ---- [] +--- +- C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h +- src/casualQuiz.h diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 23fe832..b27543c 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -2,13 +2,19 @@ :source: :path: test :file: test_casualQuiz.c -:successes: [] +:successes: +- :test: test_FcheckaufRichtigkeit_correct_answer_atIndex1 + :line: 18 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 0 - :passed: 0 + :total: 1 + :passed: 1 :failed: 0 :ignored: 0 -:stdout: [] -:time: 0.03847999998833984 +:stdout: +- Case 1 +- Right Answer, well done. +:time: 0.01348839999991469 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 95f7824..9d64abf 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.040792099985992536 +:time: 0.03404470000532456 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index cfcac27..13a42bc 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.04975489998469129 +:time: 0.03424040001118556 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 77c384d..52a6125 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0336890000035055 +:time: 0.034191499988082796 diff --git a/build/test/runners/test_casualQuiz_runner.c b/build/test/runners/test_casualQuiz_runner.c index 78eb33b..743e5b3 100644 --- a/build/test/runners/test_casualQuiz_runner.c +++ b/build/test/runners/test_casualQuiz_runner.c @@ -10,6 +10,7 @@ char* GlobalOrderError; /*=======External Functions This Runner Calls=====*/ extern void setUp(void); extern void tearDown(void); +extern void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void); /*=======Mock Management=====*/ @@ -26,12 +27,6 @@ static void CMock_Destroy(void) { } -/*=======Setup (stub)=====*/ -void setUp(void) {} - -/*=======Teardown (stub)=====*/ -void tearDown(void) {} - /*=======Test Reset Options=====*/ void resetTest(void); void resetTest(void) @@ -48,10 +43,39 @@ 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_casualQuiz.c"); + run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex1, "test_FcheckaufRichtigkeit_correct_answer_atIndex1", 18); return UnityEnd(); } diff --git a/test/test_casualQuiz.c b/test/test_casualQuiz.c index e69de29..664c6a6 100644 --- a/test/test_casualQuiz.c +++ b/test/test_casualQuiz.c @@ -0,0 +1,28 @@ +#ifdef TEST + +#include +#include +#include "unity.h" +#include "casualQuiz.h" + +// Test setup function +void setUp(void) { + +} + +// Test teardown function +void tearDown(void) { + +} + +void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){ + int TESTeingabe = 1; + int TESTindex = 0; + int TESTrichtige_antwort[]={1}; + bool testfall; + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + + TEST_ASSERT_TRUE(testfall == true); + +} +#endif //Test \ No newline at end of file