diff --git a/src/minirechner.c b/src/minirechner.c index 2ee4fd7..b5bf37b 100644 --- a/src/minirechner.c +++ b/src/minirechner.c @@ -1 +1,7 @@ +#include #include "minirechner.h" + +//addieren +float addieren(float a, float b) { + return a + b; +} \ No newline at end of file diff --git a/src/minirechner.h b/src/minirechner.h index 7be865b..63695c7 100644 --- a/src/minirechner.h +++ b/src/minirechner.h @@ -1,5 +1,6 @@ #ifndef MINIRECHNER_H #define MINIRECHNER_H +float addieren(float a, float b); #endif // MINIRECHNER_H diff --git a/test/test_minirechner.c b/test/test_minirechner.c index 30b6a4c..cce14b7 100644 --- a/test/test_minirechner.c +++ b/test/test_minirechner.c @@ -12,9 +12,11 @@ void tearDown(void) { } -void test_minirechner_NeedToImplement(void) +// test addition +void test_minitaschenrechner_3_plus_4(void) { - TEST_IGNORE_MESSAGE("Need to Implement minirechner"); + float result = addieren(3, 4); + TEST_ASSERT_EQUAL(7, result); } #endif // TEST