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.

35 lines
530 B

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