From aedf039805edab7fc856bc3f7d2f227178794f25 Mon Sep 17 00:00:00 2001 From: Dennis Sperzel Date: Mon, 5 Feb 2024 10:06:06 +0100 Subject: [PATCH] testing: addition floating numbers base case 0+0=0 --- test/test_addition.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_addition.c b/test/test_addition.c index 40af2ff..89ddcd2 100644 --- a/test/test_addition.c +++ b/test/test_addition.c @@ -133,4 +133,13 @@ void test_addition_addition_allunsignedinteger(void) TEST_ASSERT_EQUAL_UINT(expected[4], result[4]); } +void test_addition_addition_float_0plus0gleich0(void) { + float result; + float expected = 0.0; + + result = addition_float(0.0, 0.0); + + TEST_ASSERT_EQUAL_FLOAT(expected, result); +} + #endif // TEST