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

Test Points

We need test points to confirm our understanding of what the code is doing. Sometimes they are easier to get to than others.

Seams

Function calls form seams between different parts of the code. These seams make the best test points. Seams let us see and influence what the code under test is doing.

Michael defines a seam as follows: “A seam is a place where you can alter the behavior in your program without editing in that place.”

Seams are where we can employ test doubles to spy on data passed to collaborators, allowing the test case to make sure the code under test is giving its collaborator the right instructions. Function call seams are also where the test double can provide indirect inputs to the code under tests 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