From ad6539037a7cd7342b6284d24f52da60a4e708ce Mon Sep 17 00:00:00 2001 From: fdai7754 Date: Sun, 4 Feb 2024 16:41:54 +0100 Subject: [PATCH] unittest stunden --- src/ageinseconds.h | 1 + test/test_ageinseconds.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/ageinseconds.h b/src/ageinseconds.h index a490ee6..2b7a006 100644 --- a/src/ageinseconds.h +++ b/src/ageinseconds.h @@ -3,5 +3,6 @@ int sekunden(int jahre); int minuten(int jahre); +int stunden(int jahre); #endif // AGEINSECONDS_H diff --git a/test/test_ageinseconds.c b/test/test_ageinseconds.c index 90fdb9a..4d2c16d 100644 --- a/test/test_ageinseconds.c +++ b/test/test_ageinseconds.c @@ -26,4 +26,11 @@ void test_ageinseconds_23_in_minuten(void) TEST_ASSERT_EQUAL(12088800, result); } +// test stunden +void test_ageinseconds_34_in_stunden(void) +{ + float result = stunden(34); + TEST_ASSERT_EQUAL(297840, result); +} + #endif // TEST