From 73f35bacf6e95afcd1210ad8141b58ff4b53f207 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Wed, 7 Feb 2024 20:50:17 +0100 Subject: [PATCH] Unittest: CzuK --- 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 30e1a0f..9cb94b5 100644 --- a/src/temperatur.h +++ b/src/temperatur.h @@ -2,5 +2,6 @@ #define TEMPERATUR_H float CzuF(float tempC); +float CzuK(float tempC); #endif //TEMPERATUR_H diff --git a/test/test_temperatur.c b/test/test_temperatur.c index e46691b..584ce47 100644 --- a/test/test_temperatur.c +++ b/test/test_temperatur.c @@ -19,4 +19,11 @@ float expected = 77; TEST_ASSERT_EQUAL(expected, result); } +void test_temperaturRechner_CzuK(void) +{ +float result = CzuK(25); +float expected = 298.15; +TEST_ASSERT_EQUAL(expected, result); +} + #endif