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) · 628 Bytes
/
Copy pathmain.cpp
File metadata and controls
23 lines (18 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// begin-snippet: googletest_existing_main
// main.cpp:
// 1. Add these two lines to your main:
#define APPROVALS_GOOGLETEST_EXISTING_MAIN
#include "ApprovalTests.hpp"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// 2. Add this line to your main:
ApprovalTests::initializeApprovalTestsForGoogleTests();
return RUN_ALL_TESTS();
}
// end-snippet
// begin-snippet: do_not_report_on_named_machine
// main.cpp
auto frontLoadedReportDisposer = ApprovalTests::Approvals::useAsFrontLoadedReporter(
ApprovalTests::BlockingReporter::onMachineNamed("MyCIMachineName"));
// end-snippet