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

Breaking Dependencies

Real code has dependencies. One module interacts with several others to get its job done. Code resists automated tests when it interacts with the operating system, hardware devices, or sometimes other modules. The bad news is that these problem dependencies make test automation difficult or maybe prohibitively expensive. The good news is that we can design code to be testable; we can break problem dependencies.

The key to breaking dependencies is a more rigorous use of interfaces, encapsulation, and data hiding and less reliance on unprotected global data. To design more modular and testable C, we employ a header file to publish the interface of a module. A testable module is one that interacts with other modules through ...

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