1

Desired Test Declaration

If we’re going to have a test-driven development (TDD) process, we need tests. This chapter will explain what the tests will do, how we will write them, and how we will use them.

We’ll be starting from the very beginning and slowly building a full library to help manage and run tests, and we’ll be using the test library to help build itself. Initially, there will only be a single test. The following chapters will add more capabilities and grow the test library.

Starting with the end goal in mind, we’ll first think about what it will be like to create and use a test. Writing tests is a big part of TDD, so it makes sense to start thinking about testing even before we have the ability to create and run tests.

TDD is a ...

Get Test-Driven Development with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.