Browse Source

Unittest: KzuF

remotes/origin/temperaturdev
Kevin Ludwig 11 months ago
parent
commit
ae207c8229
  1. 1
      src/temperatur.h
  2. 7
      test/test_temperatur.c

1
src/temperatur.h

@ -8,5 +8,6 @@ float FzuC(float tempF);
float FzuK(float tempF); float FzuK(float tempF);
float KzuC(float tempK); float KzuC(float tempK);
float KzuF(float tempK);
#endif //TEMPERATUR_H #endif //TEMPERATUR_H

7
test/test_temperatur.c

@ -46,4 +46,11 @@ float result = KzuC(298.15);
float expected = 25; float expected = 25;
TEST_ASSERT_EQUAL(expected, result); TEST_ASSERT_EQUAL(expected, result);
} }
void test_temperaturRechner_KzuF(void)
{
float result = KzuF(298.15);
float expected = 77;
TEST_ASSERT_EQUAL(expected, result);
}
#endif #endif
Loading…
Cancel
Save