[Cppunit-devel] money_example.html
Brought to you by:
blep
From: Anderson, K. <KAn...@de...> - 2005-09-28 22:22:09
|
A little feedback on the Hello World Money example document...=0D=0A=0D=0AF= irst off, thanks for such a GREAT Example!!! By providing such complete=0D=0A= documentation, you've made my decision about which of the Unit Testing=0D=0A= Libraries I think I want to use. (Not a trivial decision these days...)=0D=0A=0D= =0AA few edits to this document... (If it were in a Wiki, I wouldn't have=0D= =0Ato bother you ;-)=0D=0A=0D=0ABy using the Tools/Options... to set up the= paths for the header include=0D=0Adirectory and the library include direct= ory, it sets it up for every=0D=0Aapplication that you run on this machine.= Since most of us work in=0D=0Agroups, it would also be appropriate to set = these values in the=0D=0AProject/Settings C++/Preprocessor/Additional Inclu= de Directories... and=0D=0Athe Link/Input/Additional Library Path... settin= gs so that other people=0D=0Ain the group would get these changes when they= next did a get of the dsw=0D=0Afile. Of course, this is not an MSVC tutori= al, so you might not want to=0D=0Ago into such detail.=0D=0A=0D=0ANowhere d= o you indicate that MoneyTest.h should include Money.h, but=0D=0Athat's nec= essary after the exception class is added to Money.h=0D=0A=0D=0AFinally, th= e line:=0D=0A CPPUNIT_ASSERT_EQUAL( expectedMoney =3D=3D money.getAmount()= ); // +=3D=0D=0Aworks=0D=0Ain MoneyTest::testAdd() needs to be:=0D=0A CP= PUNIT_ASSERT_EQUAL( expectedMoney.getAmount() , money.getAmount() );=0D=0A/= / +=3D works=0D=0A=0D=0AI don't know if the form of the macro changed, or i= f this was just a=0D=0Amental error...=0D=0A=0D=0AAll in all, a tremendous = tutorial!!=0D=0A=0D=0A-Kelly=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0AE-Mail mess= ages may contain viruses, worms, or other malicious code. By reading the me= ssage and opening any attachments, the recipient accepts full responsibilit= y for taking protective action against such code. Sender is not liable for = any loss or damage arising from this message.=0D=0A=0D=0AThe information in= this e-mail is confidential and may be legally privileged. It is intended = solely for the addressee(s). Access to this e-mail by anyone else is unauth= orized.=0D=0A |