-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestPiece.h
72 lines (58 loc) · 1.74 KB
/
testPiece.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#include "piece.h"
#include <cassert>
class TestPiece
{
// code for simplicity
void run();
Piece set();
void teardown(Piece testPiece);
// test assign by position
void testAssign_Position_King();
void testAssign_Position_InvalidRow();
// test assign by piece
void testAssign_Piece_Queen();
void testAssign_Piece_Space();
void testAssign_Piece_King();
void testAssign_Piece_Rook();
void testAssign_Piece_Bishop();
void testAssign_Piece_Knight();
void testAssign_Piece_Pawn();
// test isWhite
void testIsWhite_White();
void testIsWhite_Black();
void testIsWhite_Space();
// test isMove
void testIsMove_InvalidPosition();
void testIsMove_ValidPosition();
void testIsMove_Current_Position();
// test getNMoves
void testGetNMoves_NoMoves();
void testGetNMoves_3Moves();
// test getPosition
void testGetPosition_ValidPosition();
void testGetPosition_OutOfBounds();
// test justMoved
void testJustMoved_NoMoves();
void testJustMoved_JustMoved();
void testJustMoved_OldMove();
// test getLetter
void testGetLetter_King();
void testGetLetter_Queen();
void testGetLetter_Space();
// test getMoves for pawn
void testGetMoves_Pawn_Blocked();
void testGetMoves_Pawn_SimpleMove();
void testGetMoves_Pawn_InitialMove();
void testGetMoves_Pawn_Capture();
void testGetMoves_Pawn_Enpassant();
void testGetMoves_Pawn_Promotion();
// test getMoves for king
void testGetMoves_King_FreeSpacesAllAround();
void testGetMoves_King_BlockedAllAround();
void testGetMoves_King_Capture();
void testGetMoves_King_CastleKingHasMoved();
void testGetMoves_King_CastleRookHasMoved();
void testGetMoves_King_CastleBlocked();
void testGetMoves_King_Castle();
};