Skip to content
Native ApprovalTests for C++ on Linux, Mac and Windows
C++ CMake Python C Shell sed
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows t Don't run tests in parallel in CI Feb 11, 2020
CMake Reinstate "e Move some repetitious CMake code to new file WarningsAsE… Jan 30, 2020
build e Add TODO Feb 12, 2020
doc v.8.3.0 release Feb 12, 2020
examples t Put the debug printout before the running of the tests. Jan 25, 2020
mdsource v.8.3.0 release Feb 12, 2020
scripts e Create a script to update ApprovalTests/ApprovalTests.hpp Feb 11, 2020
third_party r Reformat CMakeLists.txt files Feb 11, 2020
.clang-format a Add .clang-format file Jan 1, 2020
.gitattributes d added markdown snippets Jan 2, 2019
.gitignore e Ignore __pycache__ directories Jan 20, 2020
.travis.yml e Give up on clang-9 build on Ubuntu Travis build Jan 13, 2020 R!! Updated our copy of Catch to v2.11.0 (from v2.7.1) Dec 19, 2019
CMakeLists.txt r Reformat CMakeLists.txt files Feb 11, 2020 e Reinstate cmake_minimum_required for googletest to fix warnings Mar 22, 2019
CODEOWNERS playing around with code owners Nov 6, 2018 d Add #top anchor to code of conduct, to keep checking script happy Aug 29, 2019
LICENSE v.8.3.0 release Feb 12, 2020
appveyor.yml t Don't run tests in parallel in CI Feb 11, 2020
fix_markdown.sed d Update file name Jan 22, 2020 e Move checking of relative links in Markdown files to github CI Jan 23, 2020
mdsnippets.json e Move mdsnippets arguments to configuration file. Jan 19, 2020
mlc_config.json e Filter out checks on any markdown files in build spaces Feb 1, 2020
to_do.txt d Remove obsolete tasks from to_do.txt Feb 1, 2020

Approval Tests for C++

Build Status Build status Actions Status License Contributor Covenant

Download the latest version (v.8.3.0) of the single header file here.


What are Approval Tests?

Also known as Golden Master Tests or Snapshot Testing, Approval Tests are an alternative to asserts. If you are unfamiliar with them, we have an overview and a tutorial.

They are great for testing objects with lots of fields, or lists of objects.


Getting Started

ToString (ostream insertion)

Often, you will need to create functions to allow objects to print their state. This is commonly done with an ostream << operator. You can find examples here: To String

What's new?

Check out the Features page or upcoming release notes to see what we've been working on lately, or browse the past release notes.


If you have any comment or suggestion on this documentation, please email Llewellyn or Clare via the details in the Contributing page.

You can’t perform that action at this time.