This class describes a chess test for string or integer source and destination squares. It is used as a fixture to quickly set up tests without duplicating the code, by utilizing the overriden SetUp and TearDown functions.
More...
|
void | SetUp (ifstream &myfile) |
| Before a given test is executed, this sets up everything and initializes the variables Additionally, this performs the actual gameplay moves needed to obtain the final board representation. More...
|
|
void | TearDown () override |
| Post test operations are performed here, such as freeing dynamically allocated memory and clearing the cout flags. More...
|
|
|
Chess | chess |
| create the testing object More...
|
|
string | src |
| The source square of the piece to-be-moved. More...
|
|
string | dest |
| The destination square of the piece to-be-moved. More...
|
|
string | fen_expected |
| Expected FEN string for a given board representation before moves are made for it. More...
|
|
string | fen_obtained |
| Obtained FEN string for a given board representation after moves are made for it. More...
|
|
This class describes a chess test for string or integer source and destination squares. It is used as a fixture to quickly set up tests without duplicating the code, by utilizing the overriden SetUp and TearDown functions.
◆ SetUp()
void ChessTest::SetUp |
( |
ifstream & |
myfile | ) |
|
|
inlineprotected |
Before a given test is executed, this sets up everything and initializes the variables Additionally, this performs the actual gameplay moves needed to obtain the final board representation.
- Parameters
-
myfile | The file to read moves from |
◆ TearDown()
void ChessTest::TearDown |
( |
| ) |
|
|
inlineoverrideprotected |
Post test operations are performed here, such as freeing dynamically allocated memory and clearing the cout flags.
◆ chess
create the testing object
◆ src
The source square of the piece to-be-moved.
- Note
- Coordinates are in [A1, H8] -> A1 is bottom left, H8 is top right
◆ dest
The destination square of the piece to-be-moved.
- Note
- Coordinates are in [A1, H8] -> A1 is bottom left, H8 is top right
◆ fen_expected
string ChessTest::fen_expected |
|
protected |
Expected FEN string for a given board representation before moves are made for it.
◆ fen_obtained
string ChessTest::fen_obtained |
|
protected |
Obtained FEN string for a given board representation after moves are made for it.
The documentation for this class was generated from the following file: