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.

29 lines
605 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "TicTacToe.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test_switchPlayer_10_to_11(void) {
  11. TEST_ASSERT(switchPlayer(10) == 11);
  12. }
  13. // Testfall für die Funktion checkForWin - Horizontaler Sieg
  14. void test_CheckForWin_Horizontal_1_2_3(void) {
  15. // Teste horizontalen Sieg in der ersten Zeile
  16. TEST_ASSERT(checkForWin(10, 10, 10, 4, 5, 6, 7, 8, 9, 10) == 1);
  17. }
  18. void test_CheckForWin_Horizontal_4_5_6(void) {
  19. // Teste horizontalen Sieg in der zweiten Zeile
  20. TEST_ASSERT(checkForWin(1, 2, 3, 11, 11, 11, 7, 8, 9, 11) == 1);
  21. }
  22. #endif // TEST