Browse Source

Konflikt gelöst

remotes/origin/siamak
Habib 11 months ago
parent
commit
2db6d7e7b6
  1. 4
      src/c/funktionen.c
  2. 3
      src/c/funktionen.h
  3. 14
      src/test/test_funktionen.c

4
src/c/funktionen.c

@ -328,3 +328,7 @@ float average(float x, float y) {
float remainderValue(float x, float y) {
return fmod(x, y);
}
float f(float m) {
return m * 9.81;
}

3
src/c/funktionen.h

@ -151,4 +151,7 @@ float average(float x, float y);
// Function to calculate the remainder of division between two numbers
float remainderValue(float x, float y);
float f(float m);
// berechnet die Gewichtkraft
#endif

14
src/test/test_funktionen.c

@ -424,4 +424,18 @@ void test_tangentDegrees(void) {
// Add more test cases for different inputs and expected outputs
}
void test_weight_at_mass100(void)
{
/* arrange */
float actual;
float expected = 981;
/* act */;
float m = 100;
actual = f(m);
/* assert */
TEST_ASSERT_EQUAL_FLOAT(expected, actual);
}
#endif
Loading…
Cancel
Save