GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - approvals/ApprovalTests.cpp: Native ApprovalTests for C++ on Linux, Mac and Windows

BranchesTags
Open more actions menu

Latest commit

 

History

4,396 Commits
4,396 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.windsurf
.windsurf
 
 
ApprovalTests
ApprovalTests
 
 
CMake
CMake
 
 
InternalDocuments
InternalDocuments
 
 
build
build
 
 
doc
doc
 
 
examples
examples
 
 
scripts
scripts
 
 
tests
tests
 
 
third_party
third_party
 
 
.clang-format
.clang-format
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.mdl_style.rb
.mdl_style.rb
 
 
.mdlrc
.mdlrc
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
AGENTS.md
AGENTS.md
 
 
BUILD-Windows.md
BUILD-Windows.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CODEOWNERS
CODEOWNERS
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
claude.md
claude.md
 
 
fix_markdown.sed
fix_markdown.sed
 
 
fix_markdown.sh
fix_markdown.sh
 
 
mdsnippets.json
mdsnippets.json
 
 
mlc_config.json
mlc_config.json
 
 
run_markdown_templates.sh
run_markdown_templates.sh
 
 
to_do.txt
to_do.txt
 
 

Repository files navigation

Approval Tests for C++

build cygwin mingw python-tests

ConanCenter package vcpkg
Documentation Status
License Contributor Covenant

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

📖 Read the Docs

Contents

  • What are Approval Tests?
  • Requirements
  • Getting Started
  • ToString (ostream insertion)
  • What's new?
  • Feedback

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

  • C++11 (or above) compiler
  • Mac/Linux/Windows
  • One of: GoogleTest, Catch2, CppUTest, doctest, Boost.Test, [Boost].UT

Getting Started

  • Download The Approval.cpp Starter Project
  • Read the Getting Started page
  • Set up your main file.
  • Read the User Guide on Read the Docs or on GitHub.
  • Watch the Videos

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

approvaltestscpp.readthedocs.io/en/latest/

Topics

approval-testapproval-testingc-plus-pluscpp11golden-masterheader-onlyregression-testingsingle-filesnapshot-testingtesting

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct
Activity
Custom properties

Stars

342 stars

Watchers

14 watching

Forks

55 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.