summaryrefslogtreecommitdiff
path: root/tests/corelib/numerics/BasicAmountTest.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/corelib/numerics/BasicAmountTest.h')
-rw-r--r--tests/corelib/numerics/BasicAmountTest.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/corelib/numerics/BasicAmountTest.h b/tests/corelib/numerics/BasicAmountTest.h
new file mode 100644
index 00000000..bd1360d5
--- /dev/null
+++ b/tests/corelib/numerics/BasicAmountTest.h
@@ -0,0 +1,50 @@
+#ifndef _BASICAMOUNTTEST_H
+#define _BASICAMOUNTTEST_H
+
+#include "UnitTests.h"
+
+class BasicAmountTest : public CPPUNIT_NS::TestCase
+{
+ CPPUNIT_TEST_SUITE(BasicAmountTest);
+
+ CPPUNIT_TEST(testConstructors);
+ CPPUNIT_TEST(testNegation);
+ CPPUNIT_TEST(testAssignment);
+ CPPUNIT_TEST(testEquality);
+ CPPUNIT_TEST(testIntegerAddition);
+ CPPUNIT_TEST(testFractionalAddition);
+ CPPUNIT_TEST(testIntegerSubtraction);
+ CPPUNIT_TEST(testFractionalSubtraction);
+ CPPUNIT_TEST(testIntegerMultiplication);
+ CPPUNIT_TEST(testFractionalMultiplication);
+ CPPUNIT_TEST(testIntegerDivision);
+ CPPUNIT_TEST(testFractionalDivision);
+
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ BasicAmountTest() {}
+ virtual ~BasicAmountTest() {}
+
+ virtual void setUp();
+ virtual void tearDown();
+
+ void testConstructors();
+ void testNegation();
+ void testAssignment();
+ void testEquality();
+ void testIntegerAddition();
+ void testFractionalAddition();
+ void testIntegerSubtraction();
+ void testFractionalSubtraction();
+ void testIntegerMultiplication();
+ void testFractionalMultiplication();
+ void testIntegerDivision();
+ void testFractionalDivision();
+
+private:
+ BasicAmountTest(const BasicAmountTest &copy);
+ void operator=(const BasicAmountTest &copy);
+};
+
+#endif /* _BASICAMOUNTTEST_H */