diff --git a/build/test/cache/defines_dependency.yml b/build/test/cache/defines_dependency.yml index 2fbf0ff..dc23d51 100644 --- a/build/test/cache/defines_dependency.yml +++ b/build/test/cache/defines_dependency.yml @@ -1 +1,3 @@ ---- {} +--- +src/wwm.c: +- TEST diff --git a/build/test/cache/input.yml b/build/test/cache/input.yml index 3a17ccd..bd75b60 100644 --- a/build/test/cache/input.yml +++ b/build/test/cache/input.yml @@ -77,10 +77,10 @@ :testfail: ".fail" :dependencies: ".d" :unity: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :cmock: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :includes: [] :mock_prefix: mock_ @@ -99,14 +99,14 @@ :verbosity: 3 :unity_helper: false :cexception: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :test_runner: :includes: [] :file_suffix: _runner :tools: :test_compiler: - :executable: gcc + :executable: gcc.exe :name: default_test_compiler :stderr_redirect: :none :background_exec: :none @@ -132,7 +132,7 @@ :optional: false :arguments: [] :test_linker: - :executable: gcc + :executable: gcc.exe :name: default_test_linker :stderr_redirect: :none :background_exec: :none @@ -148,7 +148,7 @@ - "${4}" - '' :test_file_preprocessor: - :executable: gcc + :executable: gcc.exe :name: default_test_file_preprocessor :stderr_redirect: :none :background_exec: :none @@ -165,7 +165,7 @@ - '"${1}"' - -o "${2}" :test_file_preprocessor_directives: - :executable: gcc + :executable: gcc.exe :name: default_test_file_preprocessor_directives :stderr_redirect: :none :background_exec: :none @@ -181,7 +181,7 @@ - '"${1}"' - -o "${2}" :test_includes_preprocessor: - :executable: gcc + :executable: gcc.exe :name: default_test_includes_preprocessor :stderr_redirect: :none :background_exec: :none @@ -223,13 +223,13 @@ :arguments: [] :plugins: :load_paths: - - "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins" + - C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins :enabled: - stdout_pretty_tests_report - module_generator :display_raw_test_results: false - :stdout_pretty_tests_report_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report" - :module_generator_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/module_generator" + :stdout_pretty_tests_report_path: C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report + :module_generator_path: C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/module_generator :gcov: :reports: - HtmlDetailed diff --git a/build/test/cache/test_wwm.c b/build/test/cache/test_wwm.c index e69de29..1b68dfd 100644 --- a/build/test/cache/test_wwm.c +++ b/build/test/cache/test_wwm.c @@ -0,0 +1,89 @@ +#include "src/wwm.h" +#include "C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + + + +void setUp(void) { + + + +} + + + +void tearDown(void) { + + + +} + + + +void test_setGeld_1(void) { + + + + runde = 0; + + geld = 0; + + frage = 0; + + useranswer = 0; + + + + + + UnityAssertEqualNumber((UNITY_INT)((100)), (UNITY_INT)((setGeld(1))), ( + + ((void *)0) + + ), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((100)), (UNITY_INT)((geld)), ( + + ((void *)0) + + ), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); + + + +} + + + +void test_setGeld_2(void) { + + + + runde = 0; + + + + UnityAssertEqualNumber((UNITY_INT)((300)), (UNITY_INT)((setGeld(3))), ( + + ((void *)0) + + ), (UNITY_UINT)(31), UNITY_DISPLAY_STYLE_INT); + + + + + +} + + + +void test_crandomNumber(void){ + + int result = crandomNumber(); + + do {if ((result >= 0 && result <= 9)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(38)));}} while(0); + + + +} diff --git a/build/test/dependencies/cmock.d b/build/test/dependencies/cmock.d index 7d1cf5d..a9317fd 100644 --- a/build/test/dependencies/cmock.d +++ b/build/test/dependencies/cmock.d @@ -1,6 +1,6 @@ build/test/out/c/cmock.o: \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/force_build b/build/test/dependencies/force_build new file mode 100644 index 0000000..e69de29 diff --git a/build/test/dependencies/test_casualQuiz_runner.d b/build/test/dependencies/test_casualQuiz_runner.d index 636c727..c7e7649 100644 --- a/build/test/dependencies/test_casualQuiz_runner.d +++ b/build/test/dependencies/test_casualQuiz_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_casualQuiz_runner.o: \ build/test/runners/test_casualQuiz_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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_quizduell_runner.d b/build/test/dependencies/test_quizduell_runner.d index 39185b6..c8f104f 100644 --- a/build/test/dependencies/test_quizduell_runner.d +++ b/build/test/dependencies/test_quizduell_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_quizduell_runner.o: \ build/test/runners/test_quizduell_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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_timequiz_runner.d b/build/test/dependencies/test_timequiz_runner.d index de707f2..6ef909d 100644 --- a/build/test/dependencies/test_timequiz_runner.d +++ b/build/test/dependencies/test_timequiz_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_timequiz_runner.o: \ build/test/runners/test_timequiz_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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_wwm.d b/build/test/dependencies/test_wwm.d index afd6520..a39f355 100644 --- a/build/test/dependencies/test_wwm.d +++ b/build/test/dependencies/test_wwm.d @@ -1 +1,4 @@ -build/test/out/c/test_wwm.o: test/test_wwm.c +build/test/out/c/test_wwm.o: test/test_wwm.c \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ + src/wwm.h diff --git a/build/test/dependencies/test_wwm_runner.d b/build/test/dependencies/test_wwm_runner.d index 6594640..12d3bf9 100644 --- a/build/test/dependencies/test_wwm_runner.d +++ b/build/test/dependencies/test_wwm_runner.d @@ -1,3 +1,3 @@ build/test/out/c/test_wwm_runner.o: build/test/runners/test_wwm_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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/unity.d b/build/test/dependencies/unity.d index e42504d..25fa920 100644 --- a/build/test/dependencies/unity.d +++ b/build/test/dependencies/unity.d @@ -1,4 +1,4 @@ build/test/out/c/unity.o: \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.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 + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.c \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/wwm.d b/build/test/dependencies/wwm.d new file mode 100644 index 0000000..968e82b --- /dev/null +++ b/build/test/dependencies/wwm.d @@ -0,0 +1 @@ +build/test/out/c/wwm.o: src/wwm.c src/wwm.h diff --git a/build/test/out/c/cmock.o b/build/test/out/c/cmock.o index 223fe71..96210cf 100644 Binary files a/build/test/out/c/cmock.o and b/build/test/out/c/cmock.o differ diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index 056d894..c86e42b 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 9291cc5..fc9d086 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/c/test_quizduell.o b/build/test/out/c/test_quizduell.o index d320de5..158a1fd 100644 Binary files a/build/test/out/c/test_quizduell.o and b/build/test/out/c/test_quizduell.o differ diff --git a/build/test/out/c/test_quizduell_runner.o b/build/test/out/c/test_quizduell_runner.o index f255dc5..ffe496e 100644 Binary files a/build/test/out/c/test_quizduell_runner.o and b/build/test/out/c/test_quizduell_runner.o differ diff --git a/build/test/out/c/test_timequiz.o b/build/test/out/c/test_timequiz.o index 44d422a..09affb6 100644 Binary files a/build/test/out/c/test_timequiz.o and b/build/test/out/c/test_timequiz.o differ diff --git a/build/test/out/c/test_timequiz_runner.o b/build/test/out/c/test_timequiz_runner.o index 4ce060a..4c81c4b 100644 Binary files a/build/test/out/c/test_timequiz_runner.o and b/build/test/out/c/test_timequiz_runner.o differ diff --git a/build/test/out/c/test_wwm.o b/build/test/out/c/test_wwm.o index c1fb4e9..2ec22ff 100644 Binary files a/build/test/out/c/test_wwm.o and b/build/test/out/c/test_wwm.o differ diff --git a/build/test/out/c/test_wwm_runner.o b/build/test/out/c/test_wwm_runner.o index 8cbff0e..c6d1b7f 100644 Binary files a/build/test/out/c/test_wwm_runner.o and b/build/test/out/c/test_wwm_runner.o differ diff --git a/build/test/out/c/unity.o b/build/test/out/c/unity.o index 7978819..8faf147 100644 Binary files a/build/test/out/c/unity.o and b/build/test/out/c/unity.o differ diff --git a/build/test/out/c/wwm.o b/build/test/out/c/wwm.o new file mode 100644 index 0000000..d0c1f9f Binary files /dev/null and b/build/test/out/c/wwm.o differ diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index 5e23927..c60d16e 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 1d12660..f76b926 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 b11a47c..14d30e2 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 621f189..d544bed 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_wwm.c b/build/test/preprocess/files/test_wwm.c index e69de29..1b68dfd 100644 --- a/build/test/preprocess/files/test_wwm.c +++ b/build/test/preprocess/files/test_wwm.c @@ -0,0 +1,89 @@ +#include "src/wwm.h" +#include "C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + + + +void setUp(void) { + + + +} + + + +void tearDown(void) { + + + +} + + + +void test_setGeld_1(void) { + + + + runde = 0; + + geld = 0; + + frage = 0; + + useranswer = 0; + + + + + + UnityAssertEqualNumber((UNITY_INT)((100)), (UNITY_INT)((setGeld(1))), ( + + ((void *)0) + + ), (UNITY_UINT)(22), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((100)), (UNITY_INT)((geld)), ( + + ((void *)0) + + ), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); + + + +} + + + +void test_setGeld_2(void) { + + + + runde = 0; + + + + UnityAssertEqualNumber((UNITY_INT)((300)), (UNITY_INT)((setGeld(3))), ( + + ((void *)0) + + ), (UNITY_UINT)(31), UNITY_DISPLAY_STYLE_INT); + + + + + +} + + + +void test_crandomNumber(void){ + + int result = crandomNumber(); + + do {if ((result >= 0 && result <= 9)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(38)));}} while(0); + + + +} diff --git a/build/test/preprocess/includes/test_wwm.c b/build/test/preprocess/includes/test_wwm.c index dcd024e..29c3226 100644 --- a/build/test/preprocess/includes/test_wwm.c +++ b/build/test/preprocess/includes/test_wwm.c @@ -1 +1,3 @@ ---- [] +--- +- C:/Ruby30/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h +- src/wwm.h diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index f499a71..2a6ecb3 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.004336156009230763 +:time: 0.09232900000642985 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index c39a5bb..bdc0e8f 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.004334530996857211 +:time: 0.07104519999120384 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index b96e36f..c7ff187 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.0043847519846167415 +:time: 0.06864710000809282 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 5af2254..1a322fc 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -2,13 +2,25 @@ :source: :path: test :file: test_wwm.c -:successes: [] +:successes: +- :test: test_setGeld_1 + :line: 14 + :message: '' + :unity_test_time: 0 +- :test: test_setGeld_2 + :line: 27 + :message: '' + :unity_test_time: 0 +- :test: test_crandomNumber + :line: 36 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 0 - :passed: 0 + :total: 3 + :passed: 3 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.004366140026831999 +:time: 0.46659269998781383 diff --git a/build/test/runners/test_wwm_runner.c b/build/test/runners/test_wwm_runner.c index a1a6aa9..cdd1eb8 100644 --- a/build/test/runners/test_wwm_runner.c +++ b/build/test/runners/test_wwm_runner.c @@ -10,6 +10,9 @@ char* GlobalOrderError; /*=======External Functions This Runner Calls=====*/ extern void setUp(void); extern void tearDown(void); +extern void test_setGeld_1(void); +extern void test_setGeld_2(void); +extern void test_crandomNumber(void); /*=======Mock Management=====*/ @@ -26,12 +29,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 +45,41 @@ 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_wwm.c"); + run_test(test_setGeld_1, "test_setGeld_1", 14); + run_test(test_setGeld_2, "test_setGeld_2", 27); + run_test(test_crandomNumber, "test_crandomNumber", 36); return UnityEnd(); }