1 #ifndef CHESSSERIALIZATIONTEST_H
2 #define CHESSSERIALIZATIONTEST_H
4 #include <cppunit/extensions/HelperMacros.h>
5 #include <cppunit/TestCaller.h>
6 #include <cppunit/TestResult.h>
7 #include <cppunit/TestFixture.h>
8 #include <cppunit/TestAssert.h>
11 class IMoveSerializer
;
15 class ChessSerializationTest
: public CppUnit::TestFixture
{
16 CPPUNIT_TEST_SUITE(ChessSerializationTest
);
17 CPPUNIT_TEST(test_pawn
);
18 CPPUNIT_TEST(test_check
);
19 CPPUNIT_TEST(test_check_capture
);
20 CPPUNIT_TEST(test_promotion
);
21 CPPUNIT_TEST(test_promotion_capture
);
22 CPPUNIT_TEST(test_promotion_check
);
23 CPPUNIT_TEST(test_promotion_capture_check
);
24 CPPUNIT_TEST(test_castling_k
);
25 CPPUNIT_TEST(test_castling_q
);
27 CPPUNIT_TEST(regression_knight_king
);
28 CPPUNIT_TEST_SUITE_END();
31 IDefaultState
* m_state
;
32 IValidator
* m_validator
;
33 IMoveSerializer
* m_decorator
;
34 IMoveSerializer
* m_san
;
35 IMoveSerializer
* m_simple
;
42 void test_check_capture();
43 void test_promotion();
44 void test_promotion_capture();
45 void test_promotion_check();
46 void test_promotion_capture_check();
47 void test_castling_k();
48 void test_castling_q();
50 void regression_knight_king();
53 #endif // CHESSSERIALIZATIONTEST_H