ApprovalTests for C++

ApprovalTests.cpp is a C++ implementation of Approval Tests.

Also known as Golden Master Tests or Snapshot Testing, Approval Tests are an alternative to asserts. They are great for testing objects with lots of fields, or lists of objects.

For releases and source code, see GitHub.

Getting Started

If you are new to Approval Tests, or to this C++ library, start here:

Test Frameworks

Approval Tests uses a test framework, in order to find out the names of tests and of source files. The test framework will also report errors for any failed Approval Tests.

Writing Tests

Now that you are set up to run Approval Tests, this section describes how to test various types of complex objects, and how to do so effectively.

Customising Behaviour

Common Challenges

How-to Guides

Build Systems

Extras

Troubleshooting

Developing ApprovalTests.cpp

C++ Reference

This section contains a growing list of pages documenting the ApprovalTests.cpp API. It may be useful to see what methods, and overloads, are available. It is very short on descriptive text, as we focus our efforts on the documentation above.

Code Index