File: pooltest.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 (50 lines) | stat: -rw-r--r-- 1,210 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
#ifndef POOLTEST_H
#define POOLTEST_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 T> class Pool;
  template <typename T> class PoolCollection;
  namespace Chess {
    class Piece;
  }
}

typedef HLVariant::Chess::Piece ChessPiece;
typedef HLVariant::Pool<ChessPiece> ChessPool;
typedef HLVariant::PoolCollection<ChessPool> ChessPoolCollection;

class PoolTest : public CppUnit::TestFixture {
  CPPUNIT_TEST_SUITE(PoolTest);
  CPPUNIT_TEST(test_empty_pool);
  CPPUNIT_TEST(test_add);
  CPPUNIT_TEST(test_remove);
  CPPUNIT_TEST(test_remove_clear);
  CPPUNIT_TEST(test_size);
  CPPUNIT_TEST(test_empty_remove);
  CPPUNIT_TEST(test_pool_equality);
  CPPUNIT_TEST(test_collection_equality);
  CPPUNIT_TEST_SUITE_END();
private:
  ChessPoolCollection* m_pools;
public:
  void setUp();
  void tearDown();
  
  void test_empty_pool();
  void test_add();
  void test_remove();
  void test_remove_clear();
  void test_size();
  void test_empty_remove();
  void test_pool_equality();
  void test_collection_equality();
};

#endif // POOLTEST_H