summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestAssertTest.h
blob: 718366cfd3038d604d28c2e7078df179edd95c66 (plain)
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
#ifndef TESTASSERTTEST_H
#define TESTASSERTTEST_H

#include <cppunit/extensions/HelperMacros.h>


class TestAssertTest : public CppUnit::TestCase
{
  CPPUNIT_TEST_SUITE( TestAssertTest );
  CPPUNIT_TEST( testAssertTrue );
  CPPUNIT_TEST( testAssertFalse );
  CPPUNIT_TEST( testAssertMessageTrue );
  CPPUNIT_TEST( testAssertMessageFalse );
  CPPUNIT_TEST( testAssertDoubleEquals );
  CPPUNIT_TEST( testAssertDoubleNotEquals );
  CPPUNIT_TEST( testAssertLongEquals );
  CPPUNIT_TEST( testAssertLongNotEquals );
  CPPUNIT_TEST_SUITE_END();

public:
  TestAssertTest();

  virtual ~TestAssertTest();

  virtual void setUp();
  virtual void tearDown();

  void testAssertTrue();
  void testAssertFalse();
  
  void testAssertMessageTrue();
  void testAssertMessageFalse();

  void testAssertDoubleEquals();
  void testAssertDoubleNotEquals();

  void testAssertLongEquals();
  void testAssertLongNotEquals();

private:
  TestAssertTest( const TestAssertTest &copy );
  void operator =( const TestAssertTest &copy );

  void checkDoubleNotEquals( double expected, 
                             double actual, 
                             double delta );

private:
};

#endif  // TESTASSERTTEST_H