Mercurial > hg > orthanc
comparison UnitTestsSources/LoggingTests.cpp @ 4004:9b5ace33a00d
cleaning SetErrorWarnInfoLoggingStreams()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 06 Jun 2020 11:14:10 +0200 |
parents | 3c19371090c3 |
children | 2d4427ca4be9 |
comparison
equal
deleted
inserted
replaced
4003:3c19371090c3 | 4004:9b5ace33a00d |
---|---|
131 std::ostream warningStream(&warningStreamBuf); | 131 std::ostream warningStream(&warningStreamBuf); |
132 | 132 |
133 FuncStreamBuf<LoggingFunctionFunc> infoStreamBuf(TestInfo); | 133 FuncStreamBuf<LoggingFunctionFunc> infoStreamBuf(TestInfo); |
134 std::ostream infoStream(&infoStreamBuf); | 134 std::ostream infoStream(&infoStreamBuf); |
135 | 135 |
136 SetErrorWarnInfoLoggingStreams(&errorStream, &warningStream, &infoStream); | 136 SetErrorWarnInfoLoggingStreams(errorStream, warningStream, infoStream); |
137 | 137 |
138 { | 138 { |
139 const char* text = "E is the set of all sets that do not contain themselves. Does E contain itself?"; | 139 const char* text = "E is the set of all sets that do not contain themselves. Does E contain itself?"; |
140 LOG(ERROR) << text; | 140 LOG(ERROR) << text; |
141 std::string logLine = testErrorStream.str(); | 141 std::string logLine = testErrorStream.str(); |
182 bool ok = GetLogLinePayload(payload, logLine); | 182 bool ok = GetLogLinePayload(payload, logLine); |
183 ASSERT_TRUE(ok); | 183 ASSERT_TRUE(ok); |
184 ASSERT_STREQ(payload.c_str(), text); | 184 ASSERT_STREQ(payload.c_str(), text); |
185 } | 185 } |
186 } | 186 } |
187 | |
188 | |
189 | |
190 | |
191 | |
192 | |
193 | |
194 | |
195 | |
196 |