I found an error in money_example.html. Below is the detail:
void
MoneyTest::testAdd()
{
...
// Check
CPPUNIT_ASSERT_EQUAL( expectedMoney == money.getAmount() ); // +=
works
...
}
I think it should be
CPPUNIT_ASSERT_EQUAL( expectedMoney, money ); // += works
And I check the sample code, it is:
CPPUNIT_ASSERT( expectedMoney == money ); // add works
Both is ok.
Arthur Lee
ar...@us...
|