From 84c93bae198464a87a2c05c9f2f7f0323e2b28c4 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig <kevin.ludwig@informatik.hs-fulda.de> Date: Fri, 9 Feb 2024 19:11:42 +0100 Subject: [PATCH 1/3] Unittest: CzuF negativ --- test/test_temperatur.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_temperatur.c b/test/test_temperatur.c index 04485a8..7f8eeb3 100644 --- a/test/test_temperatur.c +++ b/test/test_temperatur.c @@ -18,6 +18,12 @@ float result = CzuF(25); float expected = 77; TEST_ASSERT_EQUAL(expected, result); } +void test_temperaturRechner_CzuFnegativ(void) +{ +float result = CzuF(-5); +float expected = 23; +TEST_ASSERT_EQUAL(expected, result); +} void test_temperaturRechner_CzuK(void) { From 9ea495d40d07800e93e7376142fe8928780de322 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig <kevin.ludwig@informatik.hs-fulda.de> Date: Fri, 9 Feb 2024 19:14:29 +0100 Subject: [PATCH 2/3] refactoring: bessere variablennamen --- src/bmi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bmi.c b/src/bmi.c index 2a892e2..1d761bd 100644 --- a/src/bmi.c +++ b/src/bmi.c @@ -27,22 +27,22 @@ const char* retResult(float points){ } int run_bmi(){ - float var1 = 0; - float var2 = 0; - float var3 = 0; + float groesse = 0; + float gewicht = 0; + float ergebnis = 0; //Groesse einlesen printf("\nBMI-Rechner\n\nGeben Sie ihre Groesse in m an(Bsp: 1.8): "); - scanf("%f", &var1); + scanf("%f", &groesse); //Gewicht einlesen printf("\nGeben Sie ihr Gewicht in kg an: "); - scanf("%f", &var2); + scanf("%f", &gewicht); //Ergebnis fuer ausgabe und Bewertung berechnen - var3 = calcBMI(var1, var2); + ergebnis = calcBMI(groesse, gewicht); - printf("\nIhr Body-Mass-Index liegt bei %.2f - %s\n", var3, retResult(var3)); + printf("\nIhr Body-Mass-Index liegt bei %.2f - %s\n", ergebnis, retResult(ergebnis)); return 0; } From 566bc7f0672d970a60697a61927171637381fb3a Mon Sep 17 00:00:00 2001 From: fdai7103 <kevin.ludwig@informatik.hs-fulda.de> Date: Fri, 9 Feb 2024 22:19:31 +0000 Subject: [PATCH 3/3] Update team.md --- team.md | 1 + 1 file changed, 1 insertion(+) diff --git a/team.md b/team.md index c3e0e5f..9d118f3 100644 --- a/team.md +++ b/team.md @@ -2,3 +2,4 @@ fdai7754, fdai7754 Kevin Ludwig, fdai7103 Lennart Goetze, fdai7852 fdai6407, fdai6407 +fdai7103, fdai7103