From e7b548dcb5aaa8c41f272fac40a155051f888031 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Wed, 7 Feb 2024 21:14:25 +0100 Subject: [PATCH] Unittest: KzuC --- src/temperatur.h | 2 ++ test/test_temperatur.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/temperatur.h b/src/temperatur.h index 1409e5d..ebdea50 100644 --- a/src/temperatur.h +++ b/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 diff --git a/test/test_temperatur.c b/test/test_temperatur.c index f237aaf..e27c7da 100644 --- a/test/test_temperatur.c +++ b/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