summaryrefslogtreecommitdiff
path: root/tests/corelib/numerics/CommodityAmount.h
blob: 5ffa78100de52bf4334498ec728ac6ebc55130bf (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
52
53
54
55
56
57
58
59
60
#ifndef _COMMODITYAMOUNT_H
#define _COMMODITYAMOUNT_H

#include "UnitTests.h"

class CommodityAmountTestCase : public CPPUNIT_NS::TestCase
{
  CPPUNIT_TEST_SUITE(CommodityAmountTestCase);

  CPPUNIT_TEST(testConstructors);
  CPPUNIT_TEST(testNegation);
  CPPUNIT_TEST(testAssignment);
  CPPUNIT_TEST(testEquality);
  CPPUNIT_TEST(testAddition);
  CPPUNIT_TEST(testSubtraction);
  CPPUNIT_TEST(testMultiplication);
  CPPUNIT_TEST(testDivision);
  CPPUNIT_TEST(testConversion);
  CPPUNIT_TEST(testRound);
  CPPUNIT_TEST(testDisplayRound);
  CPPUNIT_TEST(testTruth);
  CPPUNIT_TEST(testForZero);
  CPPUNIT_TEST(testComparisons);
  CPPUNIT_TEST(testSign);
  CPPUNIT_TEST(testAbs);
  CPPUNIT_TEST(testPrinting);

  CPPUNIT_TEST_SUITE_END();

public:
  CommodityAmountTestCase() {}
  virtual ~CommodityAmountTestCase() {}

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

  void testConstructors();
  void testNegation();
  void testAssignment();
  void testEquality();
  void testAddition();
  void testSubtraction();
  void testMultiplication();
  void testDivision();
  void testConversion();
  void testRound();
  void testDisplayRound();
  void testTruth();
  void testForZero();
  void testComparisons();
  void testSign();
  void testAbs();
  void testPrinting();

private:
  CommodityAmountTestCase(const CommodityAmountTestCase &copy);
  void operator=(const CommodityAmountTestCase &copy);
};

#endif /* _COMMODITYAMOUNT_H */