#ifndef BOARDPOINTTEST_H #define BOARDPOINTTEST_H #include #include "BoardPoint.h" class BoardPointTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE ( BoardPointTest ); CPPUNIT_TEST ( testNew ); CPPUNIT_TEST_SUITE_END (); public: BoardPointTest () {} void testNew () { CPPUNIT_ASSERT_EQUAL( (unsigned int)1, boardpoint->x ); CPPUNIT_ASSERT_EQUAL( (unsigned int)1, boardpoint->y ); } void setUp () { boardpoint = new BoardPoint(1, 1); } void tearDown () { delete boardpoint; } private: BoardPoint *boardpoint; }; CPPUNIT_TEST_SUITE_REGISTRATION( BoardPointTest ); #endif