Browse Source

Unittest switchPlayer_10_to_11

remotes/origin/tictactoedev
Sabina Grisi 11 months ago
parent
commit
7b275e0c28
  1. 2
      src/TicTacToe.h
  2. 19
      test/test_tictactoe.c

2
src/TicTacToe.h

@ -1,4 +1,6 @@
#ifndef TICTACTOE_H #ifndef TICTACTOE_H
#define TICTACTOE_H #define TICTACTOE_H
int switchPlayer(int currentPlayer);
#endif // TICTACTOE_H #endif // TICTACTOE_H

19
test/test_tictactoe.c

@ -0,0 +1,19 @@
#ifdef TEST
#include "unity.h"
#include "TicTacToe.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_switchPlayer_10_to_11(void) {
TEST_ASSERT(switchPlayer(10) == 11);
}
#endif // TEST
Loading…
Cancel
Save