There are three different places you might be starting your setup from.
Here's how to set up from:
This is when you are interested in how Approval Tests work and want to see Approval Tests in action using our provided examples.
If you just want to start doing some TDD with Approval Tests, the Tutorial will walk you through the following broad steps:
- download the ApprovalTests.cpp.StarterProject
- download a Supported Diff Tool
- Run the existing tests from the project (they should pass).
- Then open the file
tests/NewTest.cpp
, choose which of the three starting points you want, and Go!
This is when you have an existing code base that you would like to start testing, as you don't yet have any tests at all.
Start by choose a testing framework.
Then continue to the next section...
This is when you have an existing code base that has some tests already, and you would like to improve test coverage.
- Download the single header file
- Do one of:
- Add a wrapper header
- Rename the header file to
ApprovalTests.hpp
(removing its version number)
- Set up your
main()
(this is framework-dependent): - Download a Supported Diff Tool
If you current test framework is not supported, see Supporting a new test framework
- Try the Tutorial