Browse Source

Unittest: KzuC

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

2
src/temperatur.h

@ -7,4 +7,6 @@ float CzuK(float tempC);
float FzuC(float tempF);
float FzuK(float tempF);
float KzuC(float tempK);
#endif //TEMPERATUR_H

7
test/test_temperatur.c

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