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.

10 lines
364 B

  1. #include "unity.h"
  2. #include "division.h"
  3. void setUp(void){}
  4. void tearDown(void){}
  5. void test_division() {
  6. TEST_ASSERT_EQUAL_FLOAT(2.0f, divide(6.0f, 3.0f));
  7. TEST_ASSERT_EQUAL_FLOAT(-2.0f, divide(6.0f, -3.0f));
  8. TEST_ASSERT_EQUAL_FLOAT(0.0f, divide(0.0f, 5.0f));
  9. TEST_ASSERT_EQUAL_FLOAT(0.0f, divide(5.0f, 0.0f)); // Test für Division durch Null
  10. }