[Cppunit-devel] Some bugs in money_example.html
Brought to you by:
blep
From: Dmitriy A. G. <gri...@mc...> - 2006-04-04 13:37:13
|
Hello! There are some errors in your paper "Money, a step by step example". First of all, you show, how to find a bug in Money.h and fix code from Money( double amount, std::string currency ) : m_amount( amount ) , m_currency( currency ) { } to Money( double amount, std::string currency ) : m_amount( amount ) , m_currency( currency ) { } But these two code fragments are equal. May be, it must be Money( double amount, std::string currency ) : m_amount( amount ) , m_currency( "currency" ) { } in the first case. The second error is in a sentence "We want to check if to Money object are equal. Let's start by adding a new test to the suite, then add our method:" It seems, it must be "We want to check if two Money objects are equal. Let's start by adding a new test to the suite, then add our method:" |