Skip to Main Content
Test Driven Development for Embedded C
book

Test Driven Development for Embedded C

by James W. Grenning
April 2011
Intermediate to advanced content levelIntermediate to advanced
356 pages
8h 55m
English
Pragmatic Bookshelf
Content preview from Test Driven Development for Embedded C

Surgically Inserted Spy

When a system has printed output, it is usually manually inspected. Printed output can be very tedious to verify, so you probably don’t want to reinspect the output as often as you should. We will never get totally away from manually inspecting printed output, but we can eliminate the re-inspections by locking in the desired behavior.

Let’s say you already have a printf-like function to produce printed output called FormatOutput. As it is, FormatOutput is a direct function call that is in a header file with many other utilities. You would like to create a spy for FormatOutput, but you don’t want to stub out all the functions in the file containing FormatOutput. A more surgical approach is needed to intercept calls ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns for Embedded Systems in C

Design Patterns for Embedded Systems in C

Bruce Powel Douglass

Publisher Resources

ISBN: 9781941222997Errata Page