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

Make It Work for None, Then One

The fully implemented LightScheduler will have to manage a collection of scheduled items. Starting with a test case that involves many scheduled events makes for too much code. A good way to attack and conquer this problem is to start with the cases of no scheduled items and then one scheduled item, saving the many case for later. This is a common approach for engineering collection behavior using TDD.

The do nothing tests provides the shortest path to a passing test. All that is needed is the interface definitions for the production code calls. Don’t worry that it seems that nothing is being tested. The objective here is to get these boundary tests right. Later when the full implementation is in place, these ...

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