Part 12 7 chapters

Appendices

A build and toolchain reference, a GoogleTest reference, a gMock mocking reference, an xUnit test-patterns guide, a pattern-to-force quick reference that maps every pattern, principle, and idiom in the book to the forces it answers, a code-first review of the wider programming-principle vocabulary beyond SOLID, and a C++-specific review of large-scale physical design: components, levelization, and insulation.

Appendix A

Build and toolchain reference

A one-stop reference for building and testing every example: the pinned toolchain, the two CMake presets, how Conan supplies GoogleTest, the per-example and whole-repo build paths, and the hook for revisiting C++26 once its headline features settle.

15 minRead โ†’
Appendix B

Testing with GoogleTest

A reference for the GoogleTest macros, assertions, fixtures, and parameterized/typed/death tests the examples use, and how they run through CTest.

15 minRead โ†’
Appendix C

Mocking with gMock

A reference for gMock: defining mocks with MOCK_METHOD, setting expectations with EXPECT_CALL, matchers, cardinalities, actions, sequences, and the nice/strict spectrum, all on shipping collaborators.

15 minRead โ†’
Appendix D

xUnit test patterns

Gerard Meszaros's xUnit test patterns, the four-phase test, the test-double taxonomy, fixture strategies, and the common test smells, mapped onto GoogleTest and gMock.

15 minRead โ†’
Appendix E

Pattern-to-force quick reference

A completeness ledger: every GoF pattern, SOLID principle, and C++ idiom mapped to the force that justifies reaching for it, each linked to where it is built. Scan it to find the tool for a force in front of you, or to confirm the catalogue is complete.

Read โ†’
Appendix F

Programming principles, reviewed in code

A code-first review of the wider programming-principle vocabulary beyond SOLID: the names an engineer is expected to know, each grounded in a before-and-after shipping-domain C++ snippet and a note on where the principle costs something.

Read โ†’
Appendix G

Large-scale C++: physical design, reviewed in code

A code-first review of John Lakos's physical-design discipline for C++, the component, levelization, and insulation, on the shipping domain.

Read โ†’