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.

20 lines
396 B

  1. #include "unity.h"
  2. #include <math.h>
  3. #include "funktion.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test_dreieckFlaeche_NeedToImplement(void) {
  11. double a = 4;
  12. double b = 7;
  13. double c = 9;
  14. double s = (a + b + c) / 2;
  15. double result = dreieckFlaeche(a, b, c);
  16. double ergebnis = sqrt(s * (s - a) * (s - b) * (s - c));
  17. TEST_ASSERT_EQUAL_FLOAT(ergebnis, result);
  18. }