summaryrefslogtreecommitdiff
path: root/tests/corelib/numerics/BasicAmountTestCase.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-15 03:03:45 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:32 -0400
commit0ef82600e5978495cccb4eed63b1de7094deab04 (patch)
tree1859e21fc102cc68f084238299048a954692421a /tests/corelib/numerics/BasicAmountTestCase.h
parentb10fcd00d036278eafcc635a1896f7522125ac04 (diff)
downloadfork-ledger-0ef82600e5978495cccb4eed63b1de7094deab04.tar.gz
fork-ledger-0ef82600e5978495cccb4eed63b1de7094deab04.tar.bz2
fork-ledger-0ef82600e5978495cccb4eed63b1de7094deab04.zip
Miscellaneous changes
Diffstat (limited to 'tests/corelib/numerics/BasicAmountTestCase.h')
-rw-r--r--tests/corelib/numerics/BasicAmountTestCase.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/corelib/numerics/BasicAmountTestCase.h b/tests/corelib/numerics/BasicAmountTestCase.h
new file mode 100644
index 00000000..6e2f021e
--- /dev/null
+++ b/tests/corelib/numerics/BasicAmountTestCase.h
@@ -0,0 +1,50 @@
+#ifndef _BASICAMOUNTTEST_H
+#define _BASICAMOUNTTEST_H
+
+#include "UnitTests.h"
+
+class BasicAmountTestCase : public CPPUNIT_NS::TestCase
+{
+ CPPUNIT_TEST_SUITE(BasicAmountTestCase);
+
+ 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:
+ BasicAmountTestCase() {}
+ virtual ~BasicAmountTestCase() {}
+
+ 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:
+ BasicAmountTestCase(const BasicAmountTestCase &copy);
+ void operator=(const BasicAmountTestCase &copy);
+};
+
+#endif /* _BASICAMOUNTTEST_H */