const int BOARD_DIM = 4;
const int BOARD_SIZE = BOARD_DIM * BOARD_DIM;
-typedef signed char Board[BOARD_SIZE];
+struct Board {
+ signed char board[BOARD_SIZE];
+};
std::istream& operator>>(std::istream& is, Board& board);
extern signed char adjacent[BOARD_SIZE][5];
is >> b;
EXPECT_FALSE(is.fail());
EXPECT_TRUE(is.eof());
- EXPECT_THAT(b, testing::ElementsAreArray({15,14,9,13,3,1,12,8,0,11,6,4,7,5,2,10}));
+ EXPECT_THAT(b.board, testing::ElementsAreArray({15,14,9,13,3,1,12,8,0,11,6,4,7,5,2,10}));
}
TEST(Board, ShortInput) {