The latest version of the book is P3.0, released almost 2 years ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.
By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:
If you've found a new error, please submit it.
- Reported in: P3.0 (13-Jan-16)
PDF page: 15
- Reported in: P2.0 (11-Sep-14)
Paper page: 24
At bottom of page, 'This lets you get very precise about which test cases are running'. Seem you forgot the noun following 'very precise'. Completing this sentence will fill in the idea. firstname.lastname@example.org--Lee Larson
- Reported in: P1.0 (11-Feb-16)
Paper page: 137
tests/HomeAutomation/LightControllerSpy.c #includes "LightController.h". Shouldn't it #include "LightControllerSpy.h" so it can pick up the declarations in the header? Plus this would have the implementation transitively include LightController.h.--Jeff Bosch
- Reported in: P3.0 (26-Oct-14)
PDF page: 179
In the discussion about clocks roll over, since the timer has a microsecond tick period, a 32-bit counter register would roll over after a bit more than 71 minutes instead of 136 years while a 16-bit counter would roll over after a bit more than 65 ms instead of 18 hours.--Robin Farine
- Reported in: P2.0 (24-Jul-13)
PDF page: 293
MinGW and cygwin issues with the eclispe files. Here is the fix:
1) Deleted all the .project, .cproject, .cdtproject and .settings (this is a did) files to get rid of all the now obsolete files.
2) Open eclipse chose the directory above 'code' as the workspace.
3) The create a new project from File/New/Makefile Project from Existing Code/
a) browse to the 'code' dir
b) leave the toolchain as <none>
c) say OK
4) Right click the project and tell it to build.
5) You might get some warnings
6) Repeat that process for t0, t1, t2, t3.
I did something in the structure of the project I don't really care for. t0,1,2,3 are all contained in the same file tree as the 'code' project. It makes unnecessary rebuilds. It is better to turn off each project one at a time.
After you are done playing with the code under mingw or cygwin, I suggest getting a real development environment. Use a VM running some form of linux, or a straight linux machine. Any serious effort at TDD will be slowed by the turtle like sped of those emulation environments.
- Reported in: B11.0 (06-Feb-16)
Paper page: 312
Environment: Windows 10, Cygwin installed February 6th 2016 as described on page 312
README.txt instructions followed
line 19 should read as "./configure" instead of "./configure.sh"
line 28: "make everything" fails to make t1, SandBox, MakefileUnity.mk.
The problem seems to be unity
make -i -C t1
In file included from src/util/common.c:29:0:
src/util/common.c: In Funktion »explodesInTestEnvironment«:
src/util/common.c:33:11: Fehler: Vergleich mit Zeichenkettenliteral führt zu unspezifiziertem Verhalten [-Werror=address]
assert(p == "Explode - intercepted call that cannot be made in test environment");
make -i -C SandBox
In file included from ../unity.framework/src/unity.h:20:0,
../unity.framework/extras/fixture/test/unity_fixture_Test.c: In Funktion »TEST_UnityFixture_PointerSetting_«:
../unity.framework/src/unity_internals.h:324:130: Fehler: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite [-Werror=pointer-to-int-cast]
make -i -f MakefileUnity.mk
In file included from unity.framework/src/unity.h:20:0,
unity.framework/extras/fixture/test/unity_fixture_Test.c: In Funktion »TEST_UnityFixture_PointerSetting_«:
unity.framework/src/unity_internals.h:324:130: Fehler: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite [-Werror=pointer-to-int-cast]
- Reported in: P3.0 (06-Feb-16)
Paper page: 312
In order to fix the build for SandBox and MakefileUnity.mk on a Windows 10 / Cygwin 64 bit system do the following:
from code\unity.framework\extras\fixture\build\MakefileWorker.mk delete these lines:
#Kludge to work around cygwin's not supporting getconf
ifeq ($(findstring CYGWIN, $(shell uname)), CYGWIN)
LONG_BITS = 32
then merge code\unity.framework\extras\fixture\build\MakefileWorker.mk
into code\unity\build\MakefileWorker.mk--Klaus Hoffmann