Enhancing the test library to support Hamcrest matchers
Once you get a basic implementation working and passing the tests, TDD guides us to enhance the design by creating more tests and then getting the new tests to pass. That’s exactly what this chapter is all about. We’re enhancing the classic style confirmations to support the Hamcrest style.
Let’s start by creating a new file, called Hamcrest.cpp
, in the tests
folder. Now, the overall project structure should look like this:
MereTDD project root folder
Test.h
tests folder
main.cpp
Confirm.cpp
Creation.cpp
Hamcrest.cpp
Setup.cpp
If you’ve been following all the code in this book so far, remember that we’...