-
Notifications
You must be signed in to change notification settings - Fork 9
/
NewTest.cpp
31 lines (25 loc) · 1.01 KB
/
NewTest.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#define APPROVAL_TESTS_HIDE_DEPRECATED_CODE 1
#include "ApprovalTests.hpp"
#include "catch2/catch_test_macros.hpp"
using namespace ApprovalTests;
// All these tests should pass on your system.
// Please note that you will need a Diff Tool installed:
// https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/Reporters.md#supported-diff-tools
TEST_CASE("ApprovingText")
{
Approvals::verify(
"Approval Tests can verify text via the golden master method ");
}
TEST_CASE("ApprovingWithReporters")
{
// See https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/Options.md#top
// you can alter this to make the test fail and launch a diff tool:
Approvals::verify("Reporters launch only on failure, by default they are "
"the DiffReporter",
Options(DiffReporter()));
}
TEST_CASE("Approval Is just an assertion library, you don't need to use it.")
{
REQUIRE(std::string("No Approvals, only Catch") ==
"No Approvals, only Catch");
}