diff options
author | John Wiegley <johnw@newartisans.com> | 2008-04-12 01:37:50 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-05-08 02:50:18 -0400 |
commit | 289cc97d45bbd3a8cdfcc3371ade71715b75b000 (patch) | |
tree | 2b1ab8575232260c4eb779282e03f64783ccb756 /test/UnitTests.h | |
parent | 627769ccc88ae15c92c5c2e5896bb1d96f52e385 (diff) | |
download | fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.tar.gz fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.tar.bz2 fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.zip |
Exchanged old test files for the new testing code in was-v3.0.
Diffstat (limited to 'test/UnitTests.h')
-rw-r--r-- | test/UnitTests.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/UnitTests.h b/test/UnitTests.h new file mode 100644 index 00000000..e7027cf4 --- /dev/null +++ b/test/UnitTests.h @@ -0,0 +1,24 @@ +#ifndef _UNITTESTS_H +#define _UNITTESTS_H + +#include "ledger.h" + +using namespace ledger; + +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/Exception.h> +#include <cppunit/Portability.h> + +#define assertDoublesEqual(x,y,z,w) CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(x,y,z,w) +#define assertEqual(x,y) CPPUNIT_ASSERT_EQUAL(x,y) +#define assertNotEqual(x,y) CPPUNIT_ASSERT((x) != (y)) +#define assertTrue(x) CPPUNIT_ASSERT(x) +#define assertFalse(x) CPPUNIT_ASSERT(! (x)) +#define assertValid(x) CPPUNIT_ASSERT((x).valid()) +#define assertEqualMessage(x,y,z) CPPUNIT_ASSERT_EQUAL_MESSAGE(x,y,z) +#define assertMessage(x,y) CPPUNIT_ASSERT_MESSAGE(x,y) +#define assertThrow(x,y) CPPUNIT_ASSERT_THROW(x,y) + +#define internalAmount(x) amount_t::exact(x) + +#endif /* _UNITTESTS_H */ |