Setup Options

There are three different places you might be starting your setup from.

Here’s how to set up from:

I have nothing

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:

  1. download the ApprovalTests.cpp.StarterProject

  2. download a Supported Diff Tool

  3. Run the existing tests from the project (they should pass).

  4. Then open the file tests/NewTest.cpp, choose which of the three starting points you want, and Go!

I have code but no tests

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…

I have tests and code and want to add Approval Tests

This is when you have an existing code base that has some tests already, and you would like to improve test coverage.

  1. Download the single header file

  2. Do one of:

  3. Set up your main() (this is framework-dependent):

  4. Download a Supported Diff Tool

If you current test framework is not supported, see Supporting a new test framework

Next Steps