Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page 24
Example 3-7

import java.util.*;

This is unnecessary. I would guess this was placed there because the class Library
uses the java.util.vector class. Example 3-7 is the source for LibraryTest, which
merely tests the class Library, but isn't the class Library itself. No where in
LibraryTest source does any code involve java.util.* classes.

Anonymous 
Printed Page 26
Fourth paragraph, first line

r: One way to take care of the code duplication is to make the test Library a member
of LibraryTest ...

w: One way to take care of the code duplication is to make the class Library a member
of LibraryTest ...

Anonymous 
Printed Page 29
1st paragraph

The first sentence of this paragraph starts with the words: "The interface Test
contains the run() method". Test is an abstract base class, not an interface. The
text even states this one paragraph prior.

Anonymous 
Printed Page 78
Example 7-13

When I tried this with VC++7.1 with the Chapter 7 example source from the CD (same as
written in the book), I get an error on the CPPUNIT_UNIT_TEST_SUITE_REGISTRATION()
line:

c:TempUnitTestCDexampleschapter7 est.cpp(7) : error C2664:
'CppUnit::AutoRegisterSuite<TestCaseType>::AutoRegisterSuite(const std::string &)' :
cannot convert parameter 1 from 'long' to 'const std::string &'
with
[
TestCaseType=BookTest
]
Reason: cannot convert from 'long' to 'const std::string'
No constructor could take the source type, or constructor overload resolution
was ambiguous

No such problem with gcc 3.4.3 (in Cygwin). Oddly, with VC++7.1, moving the
declaration up three lines -- out of main() -- [into file scope] makes the
compilation succeed.

I found the same thing with cppunit 1.10.2, and someone on the web is doing it this
way independently:
http://www.gamesfromwithin.com/articles/0412/000061.html

Anonymous 
Printed Page 119
Just before "Step 2: Add a Book to a Library" header

I did not get the third line of the test results. I believe this is because the
UnitTest::assertTrue shown on page 114 exits when a condition is false.

Anonymous