forked from approvals/ApprovalTests.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
23 lines (18 loc) · 664 Bytes
/
main.cpp
File metadata and controls
23 lines (18 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//filesystem::
// ReSharper disable once CppUnusedIncludeDirective
#define TEST_COMMIT_REVERT_CATCH
// begin-snippet: catch_2_main
// main.cpp:
#define APPROVALS_CATCH // This tells Approval Tests to provide a main() - only do this in one cpp file
#include "ApprovalTests.hpp"
// end-snippet
using namespace ApprovalTests;
// begin-snippet: use_subdirectory_in_main
auto directoryDisposer = Approvals::useApprovalsSubdirectory("approval_tests");
// end-snippet
// begin-snippet: use_as_default_reporter_in_main
// main.cpp:
#include <memory>
auto defaultReporterDisposer =
Approvals::useAsDefaultReporter(std::make_shared<DiffReporter>());
// end-snippet