You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
447 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "fakultaet.h"
  4. #include "fakultaet.c"
  5. void setUp(void)
  6. {
  7. }
  8. void tearDown(void)
  9. {
  10. }
  11. void test_fakultaet_1(void)
  12. {
  13. int result, expected = 24;
  14. result = berechneFakultaetInt(4);
  15. TEST_ASSERT_EQUAL_INT(expected, result);
  16. }
  17. void test_fakultaet_2(void)
  18. {
  19. double result, expected = 24.0;
  20. result = berechneFakultaetInt(4.0);
  21. TEST_ASSERT_EQUAL_DOUBLE(expected, result);
  22. }
  23. #endif //TEST