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

Crash to Pass

Adding the first test to legacy code is usually the hardest. Knowing what to expect and how to react can ease the process. The crash to pass algorithm can help you get through Michael’s legacy code change algorithm from Legacy Change Algorithm .

Here’s the situation. You want to test some existing legacy code. The function to exercise in the test is part of an interwoven mass of C data structures and functions. Just getting this data structure/function call free-for-all compiled in the test harness is a challenge. Getting the code to run in the test harness is enough to make you go for coffee and never come back.

In complex C code, data used by a legacy function may not be obvious. Deciding what to initialize and how to ...

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