diff options
author | Steve M. Robbins <smr@sumost.ca> | 2008-02-21 02:48:05 +0000 |
---|---|---|
committer | Steve M. Robbins <smr@sumost.ca> | 2008-02-21 02:48:05 +0000 |
commit | e090e64a05c8aa899d48941a259124e7aaad6d63 (patch) | |
tree | 749670ec4fa2f41cebc4e72408a8a340bcbca4f1 /examples | |
parent | a5a498561726d1396a681d1a8061156b90a56ec7 (diff) |
Replace deprecated CPPUNIT_TEST_EXCEPTION with code using CPPUNIT_ASSERT_THROW.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/money/MoneyTest.cpp | 2 | ||||
-rw-r--r-- | examples/money/MoneyTest.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/money/MoneyTest.cpp b/examples/money/MoneyTest.cpp index 70e5986..65870a6 100644 --- a/examples/money/MoneyTest.cpp +++ b/examples/money/MoneyTest.cpp @@ -79,5 +79,5 @@ MoneyTest::testAddThrow() // Process Money money( 123, "USD" ); - money += money123FF; // should throw an exception + CPPUNIT_ASSERT_THROW( money += money123FF, IncompatibleMoneyError ); } diff --git a/examples/money/MoneyTest.h b/examples/money/MoneyTest.h index 44e1808..475f2e9 100644 --- a/examples/money/MoneyTest.h +++ b/examples/money/MoneyTest.h @@ -10,7 +10,7 @@ class MoneyTest : public CPPUNIT_NS::TestFixture CPPUNIT_TEST( testConstructor ); CPPUNIT_TEST( testEqual ); CPPUNIT_TEST( testAdd ); - CPPUNIT_TEST_EXCEPTION( testAddThrow, IncompatibleMoneyError ); + CPPUNIT_TEST( testAddThrow ); CPPUNIT_TEST_SUITE_END(); public: |