diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c index 8a5021a..fac6b8e 100644 --- a/build/test/cache/test_Spiellogik.c +++ b/build/test/cache/test_Spiellogik.c @@ -33,3 +33,23 @@ void test_test1(void){ ), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT); } + + + +void test_feldFrei(void){ + + int realU[20][20]; + + realU[11][12] = 1; + + int result = feldFrei( realU, 11,12); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(24), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_Spiellogik.o b/build/test/out/c/test_Spiellogik.o index 79c2add..8d0f092 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 5353197..e21c01e 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/test_Spiellogik.out b/build/test/out/test_Spiellogik.out index a5c4311..9c9f122 100755 Binary files a/build/test/out/test_Spiellogik.out and b/build/test/out/test_Spiellogik.out differ diff --git a/build/test/preprocess/files/test_Spiellogik.c b/build/test/preprocess/files/test_Spiellogik.c index 8a5021a..fac6b8e 100644 --- a/build/test/preprocess/files/test_Spiellogik.c +++ b/build/test/preprocess/files/test_Spiellogik.c @@ -33,3 +33,23 @@ void test_test1(void){ ), (UNITY_UINT)(16), UNITY_DISPLAY_STYLE_INT); } + + + +void test_feldFrei(void){ + + int realU[20][20]; + + realU[11][12] = 1; + + int result = feldFrei( realU, 11,12); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(24), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass index 43b4433..178c373 100644 --- a/build/test/results/test_Spiellogik.pass +++ b/build/test/results/test_Spiellogik.pass @@ -7,12 +7,16 @@ :line: 12 :message: '' :unity_test_time: 0 +- :test: test_feldFrei + :line: 19 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 1 - :passed: 1 + :total: 2 + :passed: 2 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0014955760002521856 +:time: 0.001353542999822821 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index ddddfee..9c32ebf 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.0015436290000252484 +:time: 0.0018875850000767969 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c index d44f2eb..2b7c4da 100644 --- a/build/test/runners/test_Spiellogik_runner.c +++ b/build/test/runners/test_Spiellogik_runner.c @@ -11,6 +11,7 @@ char* GlobalOrderError; extern void setUp(void); extern void tearDown(void); extern void test_test1(void); +extern void test_feldFrei(void); /*=======Mock Management=====*/ @@ -76,6 +77,7 @@ int main(void) { UnityBegin("test_Spiellogik.c"); run_test(test_test1, "test_test1", 12); + run_test(test_feldFrei, "test_feldFrei", 19); return UnityEnd(); } diff --git a/src/Spiellogik.h b/src/Spiellogik.h index 416da51..224e691 100644 --- a/src/Spiellogik.h +++ b/src/Spiellogik.h @@ -1,8 +1,9 @@ #include "unity.h" #ifndef PROBE_H #define PROBE_H +#define N 20 int probe(int input); - +int feldFrei(int realU[N][N], int ii, int jj); #endif \ No newline at end of file diff --git a/test/test_Spiellogik.c b/test/test_Spiellogik.c index 24c42f4..58811d3 100644 --- a/test/test_Spiellogik.c +++ b/test/test_Spiellogik.c @@ -14,4 +14,12 @@ void test_test1(void){ int result = probe(2); TEST_ASSERT_EQUAL_INT(2, result); +} + +void test_feldFrei(void){ + int realU[N][N]; + realU[11][12] = 1; + int result = feldFrei( realU, 11,12); + + TEST_ASSERT_EQUAL_INT(0 , result); } \ No newline at end of file