Browse Source

Update test/division/test_division.c

master
fdai7968 11 months ago
parent
commit
2ae9a6fd65
  1. 11
      test/division/test_division.c

11
test/division/test_division.c

@ -1 +1,10 @@
#include "unity.h"
#include "division.h"
void setUp(void){}
void tearDown(void){}
void test_division() {
TEST_ASSERT_EQUAL_FLOAT(2.0f, divide(6.0f, 3.0f));
TEST_ASSERT_EQUAL_FLOAT(-2.0f, divide(6.0f, -3.0f));
TEST_ASSERT_EQUAL_FLOAT(0.0f, divide(0.0f, 5.0f));
TEST_ASSERT_EQUAL_FLOAT(0.0f, divide(5.0f, 0.0f)); // Test für Division durch Null
}
Loading…
Cancel
Save