1 #include "../../src/piece.h"
2 #include "gtest/gtest.h"
4 TEST(PieceTest
, Constructor
)
6 for (const Color
&c
: COLORS
) {
7 for (const PieceType
&t
: PIECE_TYPES
) {
8 for (int i
= 0; i
< 9; ++i
) {
12 EXPECT_EQ(c
, p
.get_color());
13 EXPECT_EQ(t
, p
.get_type());
14 EXPECT_EQ(i
, p
.get_index());
16 // Test comparison operators
17 for (const Color
&c2
: COLORS
) {
18 for (const PieceType
&t2
: PIECE_TYPES
) {
19 for (int j
= 0; j
< 9; ++j
) {
21 if (c
== c2
&& t
== t2
&& i
== j
) {
36 EXPECT_EQ(sizeof(unsigned char), sizeof(Piece
));