Skip to content

Commit 54b41a1

Browse files
committed
Merge branch 'master' into serialization
Conflicts: tests/test_GameBoard.cpp
2 parents bc90bf5 + 0aee6e0 commit 54b41a1

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

tests/test_GameBoard.cpp

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
/*
2-
* test_GameBoard.cpp
3-
*
4-
* Created on: Feb 22, 2014
5-
* Author: The Pickle
6-
*/
7-
8-
#include <vector>
9-
#include <memory>
10-
11-
#include "GameBoard.h"
12-
#include "UnitTest++.h"
13-
14-
TEST(randomize_rolls_fail)
15-
{
16-
GameBoard * test_board = new GameBoard(std::vector<std::unique_ptr<Player>>());
17-
int badRolls[] = {0, 2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};
18-
CHECK(test_board->testRollChecking(badRolls) == false);
19-
delete(test_board);
20-
}
21-
22-
TEST(randomize_rolls_pass)
23-
{
24-
GameBoard * test_board = new GameBoard(std::vector<std::unique_ptr<Player>>());
25-
int goodRolls[] = {9, 11, 5, 4, 0, 3, 4, 2, 10, 8, 3, 6, 9, 11, 5, 10, 6, 12, 8};
26-
CHECK(test_board->testRollChecking(goodRolls) == true);
27-
delete(test_board);
1+
/*
2+
* test_GameBoard.cpp
3+
*
4+
* Created on: Feb 22, 2014
5+
* Author: The Pickle
6+
*/
7+
8+
#include <vector>
9+
#include <memory>
10+
11+
#include "GameBoard.h"
12+
#include "UnitTest++.h"
13+
14+
TEST(randomize_rolls_fail)
15+
{
16+
GameBoard test_board(std::vector<std::unique_ptr<Player>>{});
17+
int badRolls[] = {0, 2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};
18+
CHECK(test_board.testRollChecking(badRolls) == false);
19+
}
20+
21+
TEST(randomize_rolls_pass)
22+
{
23+
GameBoard test_board(std::vector<std::unique_ptr<Player>>{});
24+
int goodRolls[] = {9, 11, 5, 4, 0, 3, 4, 2, 10, 8, 3, 6, 9, 11, 5, 10, 6, 12, 8};
25+
CHECK(test_board.testRollChecking(goodRolls) == true);
2826
}

0 commit comments

Comments
 (0)