Skip to content

Latest commit

 

History

History
160 lines (104 loc) · 5.22 KB

Features.md

File metadata and controls

160 lines (104 loc) · 5.22 KB

Features

Contents

v.x.y.z

v.8.1.0

Version detection

ApprovalTests provides the following macros to detect the release version, with a set of example values shown in italics:

  • APPROVALTESTS_VERSION_MAJOR: 8
  • APPROVALTESTS_VERSION_MINOR: 1
  • APPROVALTESTS_VERSION_PATCH: 2
  • APPROVALTESTS_VERSION_STR: 8.1.2
  • APPROVALTESTS_VERSION: 80102

v.8.0.0

CMake Integration documented

See CMake Integration.

Use with Ninja generator documented

See Troubleshooting Misconfigured Build, for explanations, fixes and workarounds.

v.7.0.0

See the v.7.0.0 milestone for the full list of changes.

Support for [Boost].UT test framework

See Using Approval Tests With [Boost].UT.

v.6.0.0

Existing Catch Project - with your main()

See Existing Project - with your main().

v.5.1.0

Continuous Integration Builds

Approval tests will now never launch any reporters on supported Continuous Integration machines.

Approving multiple files in one test

See Approving multiple files in one test

ExceptionCollector

See ExceptionCollector

Using custom writers

See Using custom writers

Using custom filename extensions

See Using custom filename extensions

v.5.0.0

Multiple output files per test

See Multiple output files per test.

SeparateApprovedAndReceivedDirectoriesNamer

See SeparateApprovedAndReceivedDirectoriesNamer

Registering a Custom Namer

See Registering a Custom Namer

Before v.5.0.0

Customizing Google Tests Approval File Names

See Using Approval Tests With Google Tests

Blocking Reporter

See Blocking Reporters

Machine Blockers

Sometimes you will want tests to only run on certain machines. Machine blockers are a great way to do this.

TEST_CASE("Only run this test on John's machine")
{
    auto blocker = MachineBlocker::onMachinesNotNamed("JOHNS_MACHINE");
    if (blocker.isBlockingOnThisMachine())
    {
        return;
    }
    // Write tests here that depend on John's environment.
    REQUIRE(SystemUtils::getMachineName() == "JOHNS_MACHINE");
}

snippet source | anchor

Front Loaded Reporters

See Front Loaded Reporters

Using sub-directories for approved files

See Using sub-directories for approved files


Back to User Guide