File: boardtest.h

package info (click to toggle)
tagua 1.0~alpha2-15
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 8,028 kB
  • ctags: 7,178
  • sloc: cpp: 26,149; ansic: 13,039; makefile: 182; ruby: 87; sh: 39
file content (56 lines) | stat: -rw-r--r-- 1,282 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef BOARDTEST_H
#define BOARDTEST_H

#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestCaller.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestFixture.h>
#include <cppunit/TestAssert.h>

namespace HLVariant {
  template <typename Piece> class Board;
}

class BoardTest : public CppUnit::TestFixture {
  CPPUNIT_TEST_SUITE(BoardTest);
  CPPUNIT_TEST(test_size);
  CPPUNIT_TEST(test_get_null);
  CPPUNIT_TEST(test_set_get);
  CPPUNIT_TEST(test_valid);
  CPPUNIT_TEST(test_set_invalid);
  CPPUNIT_TEST(test_compare);
  CPPUNIT_TEST(test_clone);
  CPPUNIT_TEST(test_find);
  
  CPPUNIT_TEST(test_pathinfo_h);
  CPPUNIT_TEST(test_pathinfo_v);
  CPPUNIT_TEST(test_pathinfo_d);
  CPPUNIT_TEST(test_pathinfo_invalid);
  CPPUNIT_TEST(test_pathinfo_obstacles);
  CPPUNIT_TEST_SUITE_END();
private:
  HLVariant::Board<int>* m_board;
public:
  void setUp();
  void tearDown();
  
  // basic stuff
  void test_size();
  void test_get_null();
  void test_set_get();
  void test_valid();
  void test_set_invalid();
  void test_compare();
  void test_clone();
  void test_find();
  
  // path info
  void test_pathinfo_h();
  void test_pathinfo_v();
  void test_pathinfo_d();
  void test_pathinfo_invalid();
  void test_pathinfo_obstacles();
};

#endif // BOARDTEST_H