Browse Source

Unittest13

remotes/origin/Daniel
Daniel M 11 months ago
parent
commit
0ce248de94
  1. 32
      build/test/cache/test_duellist_spielesammlung_projekt.c
  2. BIN
      build/test/out/c/test_duellist_spielesammlung_projekt.o
  3. BIN
      build/test/out/c/test_duellist_spielesammlung_projekt_runner.o
  4. BIN
      build/test/out/test_duellist_spielesammlung_projekt.out
  5. 32
      build/test/preprocess/files/test_duellist_spielesammlung_projekt.c
  6. 10
      build/test/results/test_duellist_spielesammlung_projekt.pass
  7. 2
      build/test/runners/test_duellist_spielesammlung_projekt_runner.c
  8. 14
      src/test/test_duellist_spielesammlung_projekt.c

32
build/test/cache/test_duellist_spielesammlung_projekt.c

@ -931,3 +931,35 @@ void test_calculate_mines_HeightWidthNoRound(void)
), (UNITY_UINT)(409), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(409), UNITY_DISPLAY_STYLE_INT);
} }
void test_calculate_mines_HeightWidthFinal(void)
{
int height = 7;
int width = 7;
int expected = 12;
int result = calculate_mines(height, width);
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(423), UNITY_DISPLAY_STYLE_INT);
}

BIN
build/test/out/c/test_duellist_spielesammlung_projekt.o

BIN
build/test/out/c/test_duellist_spielesammlung_projekt_runner.o

BIN
build/test/out/test_duellist_spielesammlung_projekt.out

32
build/test/preprocess/files/test_duellist_spielesammlung_projekt.c

@ -931,3 +931,35 @@ void test_calculate_mines_HeightWidthNoRound(void)
), (UNITY_UINT)(409), UNITY_DISPLAY_STYLE_INT); ), (UNITY_UINT)(409), UNITY_DISPLAY_STYLE_INT);
} }
void test_calculate_mines_HeightWidthFinal(void)
{
int height = 7;
int width = 7;
int expected = 12;
int result = calculate_mines(height, width);
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(423), UNITY_DISPLAY_STYLE_INT);
}

10
build/test/results/test_duellist_spielesammlung_projekt.pass

@ -115,12 +115,16 @@
:line: 398 :line: 398
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_calculate_mines_HeightWidthFinal
:line: 412
:message: ''
:unity_test_time: 0
:failures: [] :failures: []
:ignores: [] :ignores: []
:counts: :counts:
:total: 28
:passed: 28
:total: 29
:passed: 29
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.050488599999880535
:time: 0.05077199999959703

2
build/test/runners/test_duellist_spielesammlung_projekt_runner.c

@ -38,6 +38,7 @@ extern void test_calculate_mines_HeightWidthNumber(void);
extern void test_calculate_mines_HeightWidthAgan(void); extern void test_calculate_mines_HeightWidthAgan(void);
extern void test_calculate_mines_HeightWidthRoundUp(void); extern void test_calculate_mines_HeightWidthRoundUp(void);
extern void test_calculate_mines_HeightWidthNoRound(void); extern void test_calculate_mines_HeightWidthNoRound(void);
extern void test_calculate_mines_HeightWidthFinal(void);
/*=======Mock Management=====*/ /*=======Mock Management=====*/
@ -130,6 +131,7 @@ int main(void)
run_test(test_calculate_mines_HeightWidthAgan, "test_calculate_mines_HeightWidthAgan", 370); run_test(test_calculate_mines_HeightWidthAgan, "test_calculate_mines_HeightWidthAgan", 370);
run_test(test_calculate_mines_HeightWidthRoundUp, "test_calculate_mines_HeightWidthRoundUp", 384); run_test(test_calculate_mines_HeightWidthRoundUp, "test_calculate_mines_HeightWidthRoundUp", 384);
run_test(test_calculate_mines_HeightWidthNoRound, "test_calculate_mines_HeightWidthNoRound", 398); run_test(test_calculate_mines_HeightWidthNoRound, "test_calculate_mines_HeightWidthNoRound", 398);
run_test(test_calculate_mines_HeightWidthFinal, "test_calculate_mines_HeightWidthFinal", 412);
return UnityEnd(); return UnityEnd();
} }

14
src/test/test_duellist_spielesammlung_projekt.c

@ -408,4 +408,18 @@ void test_calculate_mines_HeightWidthNoRound(void)
/* assert */ /* assert */
TEST_ASSERT_EQUAL_INT(expected, result); TEST_ASSERT_EQUAL_INT(expected, result);
} }
void test_calculate_mines_HeightWidthFinal(void)
{
/* arrange */
int height = 7;
int width = 7;
int expected = 12;
/* act */
int result = calculate_mines(height, width);
/* assert */
TEST_ASSERT_EQUAL_INT(expected, result);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save