forked from approvals/ApprovalTests.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MacReporters.cpp
88 lines (76 loc) · 2.49 KB
/
MacReporters.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include "ApprovalTests/reporters/MacReporters.h"
#include "DiffPrograms.h"
namespace ApprovalTests
{
namespace Mac
{
DiffMergeReporter::DiffMergeReporter()
: GenericDiffReporter(DiffPrograms::Mac::DIFF_MERGE())
{
}
// begin-snippet: add_reporter_class_implementation
AraxisMergeReporter::AraxisMergeReporter()
: GenericDiffReporter(DiffPrograms::Mac::ARAXIS_MERGE())
{
}
// end-snippet
VisualStudioCodeReporter::VisualStudioCodeReporter()
: GenericDiffReporter(DiffPrograms::Mac::VS_CODE())
{
}
BeyondCompareReporter::BeyondCompareReporter()
: GenericDiffReporter(DiffPrograms::Mac::BEYOND_COMPARE())
{
}
KaleidoscopeReporter::KaleidoscopeReporter()
: GenericDiffReporter(DiffPrograms::Mac::KALEIDOSCOPE())
{
}
SublimeMergeReporter::SublimeMergeReporter()
: GenericDiffReporter(DiffPrograms::Mac::SUBLIME_MERGE())
{
launcher.setForeground(true);
}
KDiff3Reporter::KDiff3Reporter()
: GenericDiffReporter(DiffPrograms::Mac::KDIFF3())
{
}
P4MergeReporter::P4MergeReporter()
: GenericDiffReporter(DiffPrograms::Mac::P4MERGE())
{
}
TkDiffReporter::TkDiffReporter()
: GenericDiffReporter(DiffPrograms::Mac::TK_DIFF())
{
}
CLionDiffReporter::CLionDiffReporter()
: GenericDiffReporter(DiffPrograms::Mac::CLION())
{
}
MacDiffReporter::MacDiffReporter()
: FirstWorkingReporter({
// begin-snippet: mac_diff_reporters
new AraxisMergeReporter(),
new BeyondCompareReporter(),
new DiffMergeReporter(),
new KaleidoscopeReporter(),
new P4MergeReporter(),
new SublimeMergeReporter(),
new KDiff3Reporter(),
new TkDiffReporter(),
new VisualStudioCodeReporter(),
new CLionDiffReporter()
// end-snippet
})
{
}
bool MacDiffReporter::report(std::string received, std::string approved) const
{
if (!SystemUtils::isMacOs())
{
return false;
}
return FirstWorkingReporter::report(received, approved);
}
}
}