Browse Source

remainderValue Funktion test

remotes/origin/Abdelrahman
Abdelrahman 11 months ago
parent
commit
d1cbecabb9
  1. 2
      src/c/funktionen.h
  2. 6
      src/test/test_funktionen.c

2
src/c/funktionen.h

@ -46,4 +46,6 @@ float minimum(float x, float y);
// Function to calculate the average of two numbers
float average(float x, float y);
// Function to calculate the remainder of division between two numbers
float remainderValue(float x, float y);
#endif

6
src/test/test_funktionen.c

@ -87,4 +87,10 @@ void test_average(void) {
TEST_ASSERT_FLOAT_WITHIN(0.000001, 7.0, result);
}
void test_remainderValue(void) {
float result = remainderValue(10.5, 3.0);
TEST_ASSERT_FLOAT_WITHIN(0.000001, 1.5, result);
}
#endif
Loading…
Cancel
Save