More test reorg.
This commit is contained in:
parent
39b0a03f82
commit
a99695f69b
3 changed files with 1418 additions and 1392 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -3,48 +3,48 @@
|
||||||
|
|
||||||
#include "UnitTests.h"
|
#include "UnitTests.h"
|
||||||
|
|
||||||
class BasicAmountTestCase : public CPPUNIT_NS::TestCase
|
class AmountTestCase : public CPPUNIT_NS::TestCase
|
||||||
{
|
{
|
||||||
CPPUNIT_TEST_SUITE(BasicAmountTestCase);
|
CPPUNIT_TEST_SUITE(AmountTestCase);
|
||||||
|
|
||||||
CPPUNIT_TEST(testConstructors);
|
CPPUNIT_TEST(testConstructors);
|
||||||
|
CPPUNIT_TEST(testCommodityConstructors);
|
||||||
CPPUNIT_TEST(testAssignment);
|
CPPUNIT_TEST(testAssignment);
|
||||||
|
CPPUNIT_TEST(testCommodityAssignment);
|
||||||
CPPUNIT_TEST(testEquality);
|
CPPUNIT_TEST(testEquality);
|
||||||
|
CPPUNIT_TEST(testCommodityEquality);
|
||||||
CPPUNIT_TEST(testComparisons);
|
CPPUNIT_TEST(testComparisons);
|
||||||
|
CPPUNIT_TEST(testCommodityComparisons);
|
||||||
CPPUNIT_TEST(testIntegerAddition);
|
CPPUNIT_TEST(testIntegerAddition);
|
||||||
CPPUNIT_TEST(testFractionalAddition);
|
CPPUNIT_TEST(testFractionalAddition);
|
||||||
|
CPPUNIT_TEST(testCommodityAddition);
|
||||||
CPPUNIT_TEST(testIntegerSubtraction);
|
CPPUNIT_TEST(testIntegerSubtraction);
|
||||||
CPPUNIT_TEST(testFractionalSubtraction);
|
CPPUNIT_TEST(testFractionalSubtraction);
|
||||||
|
CPPUNIT_TEST(testCommoditySubtraction);
|
||||||
CPPUNIT_TEST(testIntegerMultiplication);
|
CPPUNIT_TEST(testIntegerMultiplication);
|
||||||
CPPUNIT_TEST(testFractionalMultiplication);
|
CPPUNIT_TEST(testFractionalMultiplication);
|
||||||
|
CPPUNIT_TEST(testCommodityMultiplication);
|
||||||
CPPUNIT_TEST(testIntegerDivision);
|
CPPUNIT_TEST(testIntegerDivision);
|
||||||
CPPUNIT_TEST(testFractionalDivision);
|
CPPUNIT_TEST(testFractionalDivision);
|
||||||
CPPUNIT_TEST(testNegation);
|
|
||||||
CPPUNIT_TEST(testAbs);
|
|
||||||
CPPUNIT_TEST(testFractionalRound);
|
|
||||||
CPPUNIT_TEST(testReduction);
|
|
||||||
CPPUNIT_TEST(testSign);
|
|
||||||
CPPUNIT_TEST(testTruth);
|
|
||||||
CPPUNIT_TEST(testForZero);
|
|
||||||
CPPUNIT_TEST(testIntegerConversion);
|
|
||||||
CPPUNIT_TEST(testFractionalConversion);
|
|
||||||
CPPUNIT_TEST(testPrinting);
|
|
||||||
CPPUNIT_TEST(testCommodityConstructors);
|
|
||||||
CPPUNIT_TEST(testCommodityNegation);
|
|
||||||
CPPUNIT_TEST(testCommodityAssignment);
|
|
||||||
CPPUNIT_TEST(testCommodityEquality);
|
|
||||||
CPPUNIT_TEST(testCommodityAddition);
|
|
||||||
CPPUNIT_TEST(testCommoditySubtraction);
|
|
||||||
CPPUNIT_TEST(testCommodityMultiplication);
|
|
||||||
CPPUNIT_TEST(testCommodityDivision);
|
CPPUNIT_TEST(testCommodityDivision);
|
||||||
CPPUNIT_TEST(testCommodityConversion);
|
CPPUNIT_TEST(testNegation);
|
||||||
|
CPPUNIT_TEST(testCommodityNegation);
|
||||||
|
CPPUNIT_TEST(testAbs);
|
||||||
|
CPPUNIT_TEST(testCommodityAbs);
|
||||||
|
CPPUNIT_TEST(testFractionalRound);
|
||||||
CPPUNIT_TEST(testCommodityRound);
|
CPPUNIT_TEST(testCommodityRound);
|
||||||
CPPUNIT_TEST(testCommodityDisplayRound);
|
CPPUNIT_TEST(testCommodityDisplayRound);
|
||||||
CPPUNIT_TEST(testCommodityTruth);
|
CPPUNIT_TEST(testReduction);
|
||||||
CPPUNIT_TEST(testCommodityForZero);
|
CPPUNIT_TEST(testSign);
|
||||||
CPPUNIT_TEST(testCommodityComparisons);
|
|
||||||
CPPUNIT_TEST(testCommoditySign);
|
CPPUNIT_TEST(testCommoditySign);
|
||||||
CPPUNIT_TEST(testCommodityAbs);
|
CPPUNIT_TEST(testTruth);
|
||||||
|
CPPUNIT_TEST(testCommodityTruth);
|
||||||
|
CPPUNIT_TEST(testForZero);
|
||||||
|
CPPUNIT_TEST(testCommodityForZero);
|
||||||
|
CPPUNIT_TEST(testIntegerConversion);
|
||||||
|
CPPUNIT_TEST(testFractionalConversion);
|
||||||
|
CPPUNIT_TEST(testCommodityConversion);
|
||||||
|
CPPUNIT_TEST(testPrinting);
|
||||||
CPPUNIT_TEST(testCommodityPrinting);
|
CPPUNIT_TEST(testCommodityPrinting);
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
@ -52,55 +52,55 @@ class BasicAmountTestCase : public CPPUNIT_NS::TestCase
|
||||||
public:
|
public:
|
||||||
ledger::session_t session;
|
ledger::session_t session;
|
||||||
|
|
||||||
BasicAmountTestCase() {}
|
AmountTestCase() {}
|
||||||
virtual ~BasicAmountTestCase() {}
|
virtual ~AmountTestCase() {}
|
||||||
|
|
||||||
virtual void setUp();
|
virtual void setUp();
|
||||||
virtual void tearDown();
|
virtual void tearDown();
|
||||||
|
|
||||||
void testConstructors();
|
void testConstructors();
|
||||||
|
void testCommodityConstructors();
|
||||||
void testAssignment();
|
void testAssignment();
|
||||||
|
void testCommodityAssignment();
|
||||||
void testEquality();
|
void testEquality();
|
||||||
|
void testCommodityEquality();
|
||||||
void testComparisons();
|
void testComparisons();
|
||||||
|
void testCommodityComparisons();
|
||||||
void testIntegerAddition();
|
void testIntegerAddition();
|
||||||
void testFractionalAddition();
|
void testFractionalAddition();
|
||||||
|
void testCommodityAddition();
|
||||||
void testIntegerSubtraction();
|
void testIntegerSubtraction();
|
||||||
void testFractionalSubtraction();
|
void testFractionalSubtraction();
|
||||||
|
void testCommoditySubtraction();
|
||||||
void testIntegerMultiplication();
|
void testIntegerMultiplication();
|
||||||
void testFractionalMultiplication();
|
void testFractionalMultiplication();
|
||||||
|
void testCommodityMultiplication();
|
||||||
void testIntegerDivision();
|
void testIntegerDivision();
|
||||||
void testFractionalDivision();
|
void testFractionalDivision();
|
||||||
void testNegation();
|
|
||||||
void testAbs();
|
|
||||||
void testFractionalRound();
|
|
||||||
void testReduction();
|
|
||||||
void testSign();
|
|
||||||
void testTruth();
|
|
||||||
void testForZero();
|
|
||||||
void testIntegerConversion();
|
|
||||||
void testFractionalConversion();
|
|
||||||
void testPrinting();
|
|
||||||
void testCommodityConstructors();
|
|
||||||
void testCommodityNegation();
|
|
||||||
void testCommodityAssignment();
|
|
||||||
void testCommodityEquality();
|
|
||||||
void testCommodityAddition();
|
|
||||||
void testCommoditySubtraction();
|
|
||||||
void testCommodityMultiplication();
|
|
||||||
void testCommodityDivision();
|
void testCommodityDivision();
|
||||||
void testCommodityConversion();
|
void testNegation();
|
||||||
|
void testCommodityNegation();
|
||||||
|
void testAbs();
|
||||||
|
void testCommodityAbs();
|
||||||
|
void testFractionalRound();
|
||||||
void testCommodityRound();
|
void testCommodityRound();
|
||||||
void testCommodityDisplayRound();
|
void testCommodityDisplayRound();
|
||||||
void testCommodityTruth();
|
void testReduction();
|
||||||
void testCommodityForZero();
|
void testSign();
|
||||||
void testCommodityComparisons();
|
|
||||||
void testCommoditySign();
|
void testCommoditySign();
|
||||||
void testCommodityAbs();
|
void testTruth();
|
||||||
|
void testCommodityTruth();
|
||||||
|
void testForZero();
|
||||||
|
void testCommodityForZero();
|
||||||
|
void testIntegerConversion();
|
||||||
|
void testFractionalConversion();
|
||||||
|
void testCommodityConversion();
|
||||||
|
void testPrinting();
|
||||||
void testCommodityPrinting();
|
void testCommodityPrinting();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicAmountTestCase(const BasicAmountTestCase ©);
|
AmountTestCase(const AmountTestCase ©);
|
||||||
void operator=(const BasicAmountTestCase ©);
|
void operator=(const AmountTestCase ©);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _T_AMOUNT_H
|
#endif // _T_AMOUNT_H
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue