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.

42 lines
627 B

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "temperatur.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test_temperaturRechner_CzuF(void)
  11. {
  12. float result = CzuF(25);
  13. float expected = 77;
  14. TEST_ASSERT_EQUAL(expected, result);
  15. }
  16. void test_temperaturRechner_CzuK(void)
  17. {
  18. float result = CzuK(25);
  19. float expected = 298.15;
  20. TEST_ASSERT_EQUAL(expected, result);
  21. }
  22. void test_temperaturRechner_FzuC(void)
  23. {
  24. float result = FzuC(77);
  25. float expected = 25;
  26. TEST_ASSERT_EQUAL(expected, result);
  27. }
  28. void test_temperaturRechner_FzuK(void)
  29. {
  30. float result = FzuK(77);
  31. float expected = 298.15;
  32. TEST_ASSERT_EQUAL(expected, result);
  33. }
  34. #endif