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>
10 #include "hlvariant/variantdata.h"
11 #include "hlvariant/chess/variant.h"
13 typedef HLVariant::Chess::Variant Chess
;
14 typedef VariantData
<Chess
>::LegalityCheck ChessCheck
;
15 typedef VariantData
<Chess
>::GameState ChessGameState
;
16 typedef VariantData
<Chess
>::Serializer ChessSerializer
;
17 typedef VariantData
<Chess
>::Piece ChessPiece
;
18 typedef VariantData
<Chess
>::Move ChessMove
;
20 class ChessSerializationTest
: public CppUnit::TestFixture
{
21 CPPUNIT_TEST_SUITE(ChessSerializationTest
);
22 CPPUNIT_TEST(test_pawn
);
23 CPPUNIT_TEST(test_check
);
24 CPPUNIT_TEST(test_check_capture
);
25 CPPUNIT_TEST(test_promotion
);
26 CPPUNIT_TEST(test_promotion_capture
);
27 CPPUNIT_TEST(test_promotion_check
);
28 CPPUNIT_TEST(test_promotion_capture_check
);
29 CPPUNIT_TEST(test_castling_k
);
30 CPPUNIT_TEST(test_castling_q
);
32 CPPUNIT_TEST(regression_knight_king
);
33 CPPUNIT_TEST_SUITE_END();
35 ChessGameState
* m_state
;
43 void test_check_capture();
44 void test_promotion();
45 void test_promotion_capture();
46 void test_promotion_check();
47 void test_promotion_capture_check();
48 void test_castling_k();
49 void test_castling_q();
51 void regression_knight_king();
54 #endif // CHESSSERIALIZATIONTEST_H