From df1ed97ad1687b1d01dfa766fdc4248b02838c56 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Wed, 7 Feb 2024 21:00:59 +0100 Subject: [PATCH] Unittest: KzuC --- src/temperatur.h | 1 + test/test_temperatur.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/temperatur.h b/src/temperatur.h index 9cb94b5..226e114 100644 --- a/src/temperatur.h +++ b/src/temperatur.h @@ -3,5 +3,6 @@ float CzuF(float tempC); float CzuK(float tempC); +float FzuC(float tempF); #endif //TEMPERATUR_H diff --git a/test/test_temperatur.c b/test/test_temperatur.c index 584ce47..9751fc2 100644 --- a/test/test_temperatur.c +++ b/test/test_temperatur.c @@ -26,4 +26,11 @@ float expected = 298.15; TEST_ASSERT_EQUAL(expected, result); } + +void test_temperaturRechner_FzuC(void) +{ +float result = FzuC(77); +float expected = 25; +TEST_ASSERT_EQUAL(expected, result); +} #endif