Browse Source

unittest 2: setGeld()-Test

remotes/origin/Christian
Christian Reum 11 months ago
parent
commit
186b85d298
  1. 17
      test/test_wwm.c

17
test/test_wwm.c

@ -11,7 +11,7 @@ void tearDown(void) {
// clean up after the test if needed // clean up after the test if needed
} }
void test_setGeld_and_wwm(void) {
void test_setGeld_1(void) {
// Initialize or reset variables if needed // Initialize or reset variables if needed
runde = 0; runde = 0;
geld = 0; geld = 0;
@ -19,11 +19,16 @@ void test_setGeld_and_wwm(void) {
useranswer = 0; useranswer = 0;
// Call setGeld and check the initial values // 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();
} }
Loading…
Cancel
Save