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.

40 lines
659 B

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