From 186b85d298e76ffc29eee3fad37a2d445290e55d Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:04:18 +0100 Subject: [PATCH] unittest 2: setGeld()-Test --- test/test_wwm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/test_wwm.c b/test/test_wwm.c index a9ec536..4a644d5 100644 --- a/test/test_wwm.c +++ b/test/test_wwm.c @@ -11,7 +11,7 @@ void tearDown(void) { // clean up after the test if needed } -void test_setGeld_and_wwm(void) { +void test_setGeld_1(void) { // Initialize or reset variables if needed runde = 0; geld = 0; @@ -19,11 +19,16 @@ void test_setGeld_and_wwm(void) { useranswer = 0; // Call setGeld and check the initial values - TEST_ASSERT_EQUAL(0, setGeld(0)); - TEST_ASSERT_EQUAL(0, geld); - + TEST_ASSERT_EQUAL(100, setGeld(1)); + TEST_ASSERT_EQUAL(100, geld); + +} + +void test_setGeld_2(void) { + + runde = 0; + + TEST_ASSERT_EQUAL(300, setGeld(3)); - // Call wwm and check if it runs without errors - //wwm(); }