You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
548 B

11 months ago
11 months ago
  1. // test_wwm.c
  2. #include "unity.h"
  3. #include <string.h>
  4. #include "wwm.h"
  5. void test_setGeld_1(void) {
  6. // Initialize or reset variables if needed
  7. runde = 0;
  8. geld = 0;
  9. frage = 0;
  10. useranswer = 0;
  11. // Call setGeld and check the initial values
  12. TEST_ASSERT_EQUAL(100, setGeld(1));
  13. TEST_ASSERT_EQUAL(100, geld);
  14. }
  15. void test_setGeld_2(void) {
  16. runde = 0;
  17. TEST_ASSERT_EQUAL(300, setGeld(3));
  18. }
  19. void test_crandomNumber(void){
  20. int result = crandomNumber();
  21. TEST_ASSERT_TRUE(result >= 0 && result <= 9);
  22. }