Skip to content

Native ApprovalTests for C++ on Linux, Mac and Windows

License

Notifications You must be signed in to change notification settings

claremacrae/ApprovalTests.cpp

 
 

Repository files navigation

Approval Tests for C++

Actions Status Build Status Build Status Python tests
ConanCenter package vcpkg
Documentation Status
License Contributor Covenant

⬇️ Download the latest version (v.10.12.0) of the single header file here.

📖 Read the Docs

Contents

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.

Requirements

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.

Feedback

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

About

Native ApprovalTests for C++ on Linux, Mac and Windows

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 69.9%
  • Python 19.4%
  • CMake 8.8%
  • Shell 1.1%
  • C 0.5%
  • Ruby 0.3%