44 {
45
46
47
48
49
50
51
52
53
54
55class GTEST_API_ ScopedFakeTestPartResultReporter
56 : public TestPartResultReporterInterface {
57 public:
58
59 enum InterceptMode {
60 INTERCEPT_ONLY_CURRENT_THREAD,
61 INTERCEPT_ALL_THREADS
62 };
63
64
65
66
67
68 explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);
69
70
71 ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,
72 TestPartResultArray* result);
73
74
75 ~ScopedFakeTestPartResultReporter() override;
76
77
78
79
80
81
82 void ReportTestPartResult(const TestPartResult& result) override;
83
84 private:
85 void Init();
86
87 const InterceptMode intercept_mode_;
88 TestPartResultReporterInterface* old_reporter_;
89 TestPartResultArray* const result_;
90
92};
93
94namespace internal {
95
96
97
98
99
100
102 public:
103
104 SingleFailureChecker(const TestPartResultArray* results,
105 TestPartResult::Type
type,
const std::string& substr);
106 ~SingleFailureChecker();
107 private:
108 const TestPartResultArray* const results_;
109 const TestPartResult::Type type_;
110 const std::string substr_;
111
113};
114
115}
116
117}
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)