diff --git a/build/test/cache/defines_dependency.yml b/build/test/cache/defines_dependency.yml index 12137d3..592befa 100644 --- a/build/test/cache/defines_dependency.yml +++ b/build/test/cache/defines_dependency.yml @@ -3,3 +3,5 @@ src/test.c: - TEST src/probe.c: - TEST +src/Spiellogik.c: +- TEST diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c new file mode 100644 index 0000000..8a5021a --- /dev/null +++ b/build/test/cache/test_Spiellogik.c @@ -0,0 +1,35 @@ +#include "src/Spiellogik.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_test1(void){ + + + + int result = probe(2); + + + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + +((void *)0) + +), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/dependencies/Spiellogik.d b/build/test/dependencies/Spiellogik.d new file mode 100644 index 0000000..ed54659 --- /dev/null +++ b/build/test/dependencies/Spiellogik.d @@ -0,0 +1 @@ +build/test/out/c/Spiellogik.o: src/Spiellogik.c diff --git a/build/test/dependencies/test_Spiellogik.d b/build/test/dependencies/test_Spiellogik.d new file mode 100644 index 0000000..8e19191 --- /dev/null +++ b/build/test/dependencies/test_Spiellogik.d @@ -0,0 +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 diff --git a/build/test/dependencies/test_Spiellogik_runner.d b/build/test/dependencies/test_Spiellogik_runner.d new file mode 100644 index 0000000..0eb0eca --- /dev/null +++ b/build/test/dependencies/test_Spiellogik_runner.d @@ -0,0 +1,4 @@ +build/test/out/c/test_Spiellogik_runner.o: \ + build/test/runners/test_Spiellogik_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 new file mode 100644 index 0000000..a4a2861 Binary files /dev/null and b/build/test/out/c/Spiellogik.o differ diff --git a/build/test/out/c/probe.o b/build/test/out/c/probe.o index cf46452..b27a82b 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 new file mode 100644 index 0000000..79c2add Binary files /dev/null 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 new file mode 100644 index 0000000..5353197 Binary files /dev/null and b/build/test/out/c/test_Spiellogik_runner.o differ diff --git a/build/test/out/c/test_test.o b/build/test/out/c/test_test.o index fae4bfe..92a9d92 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/test_Spiellogik.out b/build/test/out/test_Spiellogik.out new file mode 100755 index 0000000..a5c4311 Binary files /dev/null and b/build/test/out/test_Spiellogik.out differ diff --git a/build/test/out/test_test.out b/build/test/out/test_test.out index 5af9686..c891bdb 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 new file mode 100644 index 0000000..8a5021a --- /dev/null +++ b/build/test/preprocess/files/test_Spiellogik.c @@ -0,0 +1,35 @@ +#include "src/Spiellogik.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_test1(void){ + + + + int result = probe(2); + + + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + +((void *)0) + +), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/preprocess/includes/test_Spiellogik.c b/build/test/preprocess/includes/test_Spiellogik.c new file mode 100644 index 0000000..9a06f7c --- /dev/null +++ b/build/test/preprocess/includes/test_Spiellogik.c @@ -0,0 +1,3 @@ +--- +- "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" +- src/Spiellogik.h diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass new file mode 100644 index 0000000..43b4433 --- /dev/null +++ b/build/test/results/test_Spiellogik.pass @@ -0,0 +1,18 @@ +--- +:source: + :path: test + :file: test_Spiellogik.c +:successes: +- :test: test_test1 + :line: 12 + :message: '' + :unity_test_time: 0 +:failures: [] +:ignores: [] +:counts: + :total: 1 + :passed: 1 + :failed: 0 + :ignored: 0 +:stdout: [] +:time: 0.0014955760002521856 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index 2b7db9e..ddddfee 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.0012681320004048757 +:time: 0.0015436290000252484 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c new file mode 100644 index 0000000..d44f2eb --- /dev/null +++ b/build/test/runners/test_Spiellogik_runner.c @@ -0,0 +1,81 @@ +/* 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_test1(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_Spiellogik.c"); + run_test(test_test1, "test_test1", 12); + + return UnityEnd(); +} diff --git a/src/Spiellogik.c b/src/Spiellogik.c index 1c44c4d..eaa8481 100644 --- a/src/Spiellogik.c +++ b/src/Spiellogik.c @@ -66,4 +66,8 @@ int lose(int realU[N][N], char richtung){ } } return 0; +} + +int probe(int input){ + return input; } \ No newline at end of file diff --git a/src/Spiellogik.h b/src/Spiellogik.h new file mode 100644 index 0000000..416da51 --- /dev/null +++ b/src/Spiellogik.h @@ -0,0 +1,8 @@ +#include "unity.h" +#ifndef PROBE_H +#define PROBE_H + +int probe(int input); + + +#endif \ No newline at end of file diff --git a/test/test_Spiellogik.c b/test/test_Spiellogik.c new file mode 100644 index 0000000..24c42f4 --- /dev/null +++ b/test/test_Spiellogik.c @@ -0,0 +1,17 @@ +#include "unity.h" +#include "Spiellogik.h" +#include + +void setUp(void){ +} + +void tearDown(void){ + +} + +void test_test1(void){ + + int result = probe(2); + + TEST_ASSERT_EQUAL_INT(2, result); +} \ No newline at end of file