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

SOLID Design Principles

Let’s look at each principle. We’ll look at the SOLID influence on the design of some of the examples you’ve already seen in this book, as well as some new designs.

Single Responsibility Principle

The Single Responsibility Principle (SRP) states that a module should have a single responsibility—it should do one thing, and it should have a single reason to change. Applying SRP leads to modules with good cohesion, modules that are made up of functions and data with a unified purpose—in a nutshell, modules that do a job and do it well.

We’ve seen SRP at work in the modules in this book. The CircularBuffer, found in Surgically Inserted Spy , is responsible for maintaining the integrity of a FIFO data structure holding ...

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