1 /**
2 Copyright: Copyright (c) 2018, Joakim Brännström. All rights reserved.
3 License: MPL-2
4 Author: Joakim Brännström (joakim.brannstrom@gmx.com)
5 
6 This Source Code Form is subject to the terms of the Mozilla Public License,
7 v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
8 one at http://mozilla.org/MPL/2.0/.
9 
10 #SPC-track_gtest
11 */
12 module dextool.plugin.mutate.backend.test_mutant.gtest_post_analyze;
13 
14 import std.exception : collectException;
15 import std.range : isInputRange, isOutputRange;
16 import logger = std.experimental.logger;
17 
18 import dextool.plugin.mutate.backend.test_mutant.interface_ : TestCaseReport, GatherTestCase;
19 import dextool.plugin.mutate.backend.type : TestCase;
20 import dextool.type : AbsolutePath;
21 
22 /** Parse input for google test cases.
23 Params:
24     r = range that is chunked by line
25     sink = an output that accepts values of type TestCase via `put`.
26   */
27 struct GtestParser {
28     import std.regex : regex, matchFirst, matchAll;
29 
30     private {
31         // example: [==========] Running
32         const re_delim = regex(`.*?\[=*\]`);
33         // example: [ RUN      ] PassingTest.PassingTest1
34         // example: +ull)m[ RUN      ] ADeathTest.ShouldRunFirst
35         const re_run_block = regex(`.*?\[\s*RUN\s*\]\s*(?P<tc>[a-zA-Z0-9_./]*)`);
36         // example: [  FAILED  ] NonfatalFailureTest.EscapesStringOperands
37         const re_failed_block = regex(`.*?\[\s*FAILED\s*\]\s*(?P<tc>[a-zA-Z0-9_./]*)`);
38 
39         StateData data;
40     }
41 
42     void process(T)(T line, TestCaseReport report) {
43         string testCaseName(string testCase) {
44             import std.string : lastIndexOf;
45 
46             // pessimistic merge of test case names such that parameterized are
47             // grouped by their last separation.
48 
49             const idx = lastIndexOf(testCase, '/');
50 
51             if (idx == -1) {
52                 return testCase;
53             }
54             return testCase[0 .. idx];
55         }
56 
57         auto run_block_match = matchAll(line, re_run_block);
58         auto failed_block_match = matchAll(line, re_failed_block);
59         auto delim_match = matchFirst(line, re_delim);
60         data.hasRunBlock = !run_block_match.empty;
61         data.hasFailedBlock = !failed_block_match.empty;
62         data.hasDelim = !delim_match.empty;
63 
64         if (data.hasDelim) {
65             final switch (data.delim) {
66             case DelimState.unknown:
67                 data.delim = DelimState.start;
68                 break;
69             case DelimState.start:
70                 data.delim = DelimState.stop;
71                 break;
72             case DelimState.stop:
73                 data.delim = DelimState.start;
74                 break;
75             }
76         }
77 
78         if (data.hasRunBlock) {
79             // force it to a start so failed messages can be found
80             data.delim = DelimState.start;
81 
82             foreach (m; run_block_match) {
83                 report.reportFound(TestCase(testCaseName(m["tc"].idup)));
84             }
85         }
86 
87         if (data.hasFailedBlock && data.delim == DelimState.start) {
88             foreach (m; failed_block_match) {
89                 if (m["tc"].length == 0)
90                     continue;
91                 report.reportFailed(TestCase(testCaseName(m["tc"].idup), data.fail_msg_file));
92                 // the best we can do for now is for the first failed test case.
93                 // May improve in the future.
94                 data.fail_msg_file = null;
95             }
96         }
97     }
98 }
99 
100 version (unittest) {
101 } else {
102 private:
103 }
104 
105 // Determine what type of delimiter that where last found.
106 enum DelimState {
107     unknown,
108     start,
109     stop,
110 }
111 
112 struct StateData {
113     DelimState delim;
114 
115     string fail_msg_file;
116 
117     /// The line contains a [======] block.
118     bool hasDelim;
119     /// The line contains a [ RUN   ] block.
120     bool hasRunBlock;
121     /// the line contains a [ FAILED  ] block.
122     bool hasFailedBlock;
123     /// the line contains a [ OK   ] block.
124     bool hasOkBlock;
125 }
126 
127 version (unittest) {
128     import std.algorithm : each, sort;
129     import std.array : array;
130     import std.file : getcwd;
131     import unit_threaded : shouldEqual, shouldBeIn;
132 }
133 
134 @("shall report the failed test case")
135 unittest {
136     auto app = new GatherTestCase;
137 
138     GtestParser parser;
139     testData1.each!(a => parser.process(a, app));
140 
141     shouldEqual(app.failed.byKey.array, [
142             TestCase("MessageTest.DefaultConstructor")
143             ]);
144 }
145 
146 @("shall report the found test cases")
147 unittest {
148     auto app = new GatherTestCase;
149 
150     GtestParser parser;
151     testData3.each!(a => parser.process(a, app));
152 
153     shouldEqual(app.foundAsArray.sort, [
154             TestCase("Comp.A", ""), TestCase("Comp.B", ""), TestCase("Comp.C",
155                 ""), TestCase("Comp.D", ""), TestCase("Comp.E", ""),
156             ]);
157 }
158 
159 @("shall report the failed test cases")
160 unittest {
161     auto app = new GatherTestCase;
162 
163     GtestParser parser;
164     testData4.each!(a => parser.process(a, app));
165 
166     shouldEqual(app.failedAsArray.sort, [
167             TestCase("Foo.A", ""), TestCase("Foo.B", ""), TestCase("Foo.C",
168                 ""), TestCase("Foo.D", ""), TestCase("Foo.E", ""),
169             ]);
170 }
171 
172 @("shall report the failed test cases")
173 unittest {
174     auto app = new GatherTestCase;
175 
176     GtestParser parser;
177     testData5.each!(a => parser.process(a, app));
178 
179     shouldEqual(app.failedAsArray.sort, [TestCase("FooTest.ShouldFail")]);
180 }
181 
182 @("shall report the failed test cases even though there are junk in the output")
183 unittest {
184     auto app = new GatherTestCase;
185 
186     GtestParser parser;
187     testData2.each!(a => parser.process(a, app));
188 
189     // dfmt off
190     auto expected = [
191 TestCase(`AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber`),
192 TestCase(`ExpectFailureTest.ExpectFatalFailureOnAllThreads`),
193 TestCase(`ExpectFailureTest.ExpectFatalFailure`),
194 TestCase(`ExpectFailureTest.ExpectNonFatalFailureOnAllThreads`),
195 TestCase(`ExpectFailureTest.ExpectNonFatalFailure`),
196 TestCase(`ExpectFatalFailureTest.FailsWhenStatementReturns`),
197 TestCase(`ExpectFatalFailureTest.FailsWhenStatementThrows`),
198 TestCase(`ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures`),
199 TestCase(`ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure`),
200 TestCase(`ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure`),
201 TestCase(`ExpectNonfatalFailureTest.FailsWhenStatementReturns`),
202 TestCase(`ExpectNonfatalFailureTest.FailsWhenStatementThrows`),
203 TestCase(`ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures`),
204 TestCase(`ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure`),
205 TestCase(`ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure`),
206 TestCase(`MixedUpTestCaseTest.ThisShouldFailToo`),
207 TestCase(`MixedUpTestCaseTest.ThisShouldFail`),
208 TestCase(`MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`),
209 TestCase(`TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail`),
210 TestCase(`TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail`),
211 TestCase(`ExpectFailureWithThreadsTest.ExpectFatalFailure`),
212 TestCase(`ExpectFailureWithThreadsTest.ExpectNonFatalFailure`),
213 TestCase(`FatalFailureInFixtureConstructorTest.FailureInConstructor`),
214 TestCase(`FatalFailureInSetUpTest.FailureInSetUp`),
215 TestCase(`FatalFailureTest.FatalFailureInNestedSubroutine`),
216 TestCase(`FatalFailureTest.FatalFailureInSubroutine`),
217 TestCase(`FatalFailureTest.NonfatalFailureInSubroutine`),
218 TestCase(`LoggingTest.InterleavingLoggingAndAssertions`),
219 TestCase(`NonFatalFailureInFixtureConstructorTest.FailureInConstructor`),
220 TestCase(`NonFatalFailureInSetUpTest.FailureInSetUp`),
221 TestCase(`NonfatalFailureTest.DiffForLongStrings`),
222 TestCase(`NonfatalFailureTest.EscapesStringOperands`),
223 TestCase(`PrintingFailingParams/FailingParamTest.Fails`),
224 TestCase(`PrintingStrings/ParamTest.Failure`),
225 TestCase(`SCOPED_TRACETest.CanBeNested`),
226 TestCase(`SCOPED_TRACETest.CanBeRepeated`),
227 TestCase(`SCOPED_TRACETest.ObeysScopes`),
228 TestCase(`SCOPED_TRACETest.WorksConcurrently`),
229 TestCase(`SCOPED_TRACETest.WorksInLoop`),
230 TestCase(`SCOPED_TRACETest.WorksInSubroutine`),
231 TestCase(`ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread`),
232 TestCase(`TypedTest`),
233 TestCase(`Unsigned/TypedTestP`),
234             ];
235     // dfmt on
236 
237     foreach (v; expected) {
238         v.shouldBeIn(app.failed);
239     }
240 
241     shouldEqual(app.failed.length, expected.length);
242 }
243 
244 version (unittest) {
245     // dfmt off
246     string[] testData1() {
247         // dfmt off
248         return [
249 "Running main() from gtest_main.cc",
250 "[==========] Running 17 tests from 1 test case.",
251 "[----------] Global test environment set-up.",
252 "[----------] 17 tests from MessageTest",
253 "[ RUN      ] MessageTest.DefaultConstructor",
254 "./googletest/test/gtest-message_test.cc:48: Failure",
255 "Expected equality of these values:",
256 "  true",
257 "  false",
258 "[  FAILED  ] MessageTest.DefaultConstructor (0 ms)",
259 "[ RUN      ] MessageTest.CopyConstructor",
260 "[       OK ] MessageTest.CopyConstructor (0 ms)",
261 "[ RUN      ] MessageTest.ConstructsFromCString",
262 "[       OK ] MessageTest.ConstructsFromCString (0 ms)",
263 "[----------] 3 tests from MessageTest (0 ms total)",
264 "",
265 "[----------] Global test environment tear-down",
266 "[==========] 3 tests from 1 test case ran. (0 ms total)",
267 "[  PASSED  ] 2 tests.",
268 "[  FAILED  ] 1 test, listed below:",
269 "[  FAILED  ] MessageTest.DefaultConstructor",
270 "",
271 " 1 FAILED TEST",
272         ];
273         // dfmt on
274 }
275 
276 // Example data from the "wild" that should still parse
277 string[] testData2() {
278     // dfmt off
279         return [
280 `-[==========] Running 66 tests from 29 test cases.`,
281 `-[----------] Global test environment set-up.`,
282 `+ull)m[==========] Running 66 tests from 29 test cases.`,
283 `+ull)m[----------] Global test environment set-up.`,
284 ` FooEnvironment::SetUp() called.`,
285 ` BarEnvironment::SetUp() called.`,
286 `-[----------] 1 test from ADeathTest`,
287 `-[ RUN      ] ADeathTest.ShouldRunFirst`,
288 `-[       OK ] ADeathTest.ShouldRunFirst`,
289 `-[----------] 1 test from ATypedDeathTest/0, where TypeParam = int`,
290 `-[ RUN      ] ATypedDeathTest/0.ShouldRunFirst`,
291 `-[       OK ] ATypedDeathTest/0.ShouldRunFirst`,
292 `-[----------] 1 test from ATypedDeathTest/1, where TypeParam = double`,
293 `-[ RUN      ] ATypedDeathTest/1.ShouldRunFirst`,
294 `-[       OK ] ATypedDeathTest/1.ShouldRunFirst`,
295 `-[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int`,
296 `-[ RUN      ] My/ATypeParamDeathTest/0.ShouldRunFirst`,
297 `-[       OK ] My/ATypeParamDeathTest/0.ShouldRunFirst`,
298 `-[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double`,
299 `-[ RUN      ] My/ATypeParamDeathTest/1.ShouldRunFirst`,
300 `-[       OK ] My/ATypeParamDeathTest/1.ShouldRunFirst`,
301 `-[----------] 2 tests from PassingTest`,
302 `-[ RUN      ] PassingTest.PassingTest1`,
303 `-[       OK ] PassingTest.PassingTest1`,
304 `-[ RUN      ] PassingTest.PassingTest2`,
305 `-[       OK ] PassingTest.PassingTest2`,
306 `-[----------] 2 tests from NonfatalFailureTest`,
307 `-[ RUN      ] NonfatalFailureTest.EscapesStringOperands`,
308 `+ull)m[----------] 1 test from ADeathTest`,
309 `+ull)m[ RUN      ] ADeathTest.ShouldRunFirst`,
310 `+ull)m[       OK ] ADeathTest.ShouldRunFirst`,
311 `+ull)m[----------] 1 test from ATypedDeathTest/0, where TypeParam = int`,
312 `+ull)m[ RUN      ] ATypedDeathTest/0.ShouldRunFirst`,
313 `+ull)m[       OK ] ATypedDeathTest/0.ShouldRunFirst`,
314 `+ull)m[----------] 1 test from ATypedDeathTest/1, where TypeParam = double`,
315 `+ull)m[ RUN      ] ATypedDeathTest/1.ShouldRunFirst`,
316 `+ull)m[       OK ] ATypedDeathTest/1.ShouldRunFirst`,
317 `+ull)m[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int`,
318 `+ull)m[ RUN      ] My/ATypeParamDeathTest/0.ShouldRunFirst`,
319 `+ull)m[       OK ] My/ATypeParamDeathTest/0.ShouldRunFirst`,
320 `+ull)m[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double`,
321 `+ull)m[ RUN      ] My/ATypeParamDeathTest/1.ShouldRunFirst`,
322 `+ull)m[       OK ] My/ATypeParamDeathTest/1.ShouldRunFirst`,
323 `+ull)m[----------] 2 tests from PassingTest`,
324 `+ull)m[ RUN      ] PassingTest.PassingTest1`,
325 `+ull)m[       OK ] PassingTest.PassingTest1`,
326 `+ull)m[ RUN      ] PassingTest.PassingTest2`,
327 `+ull)m[       OK ] PassingTest.PassingTest2`,
328 `+ull)m[----------] 2 tests from NonfatalFailureTest`,
329 `+ull)m[ RUN      ] NonfatalFailureTest.EscapesStringOperands`,
330 ` gtest_output_test_.cc:#: Failure`,
331 ` Expected equality of these values:`,
332 `   kGoldenString`,
333 `@@ -47,7 +47,7 @@`,
334 ``,
335 `   actual`,
336 `     Which is: "actual \"string\""`,
337 ` [  FAILED  ] NonfatalFailureTest.EscapesStringOperands`,
338 `-[ RUN      ] NonfatalFailureTest.DiffForLongStrings`,
339 `+ull)m[ RUN      ] NonfatalFailureTest.DiffForLongStrings`,
340 ` gtest_output_test_.cc:#: Failure`,
341 ` Expected equality of these values:`,
342 `   golden_str`,
343 `@@ -59,8 +59,8 @@`,
344 ``,
345 `  Line 2`,
346 ``,
347 ` [  FAILED  ] NonfatalFailureTest.DiffForLongStrings`,
348 `-[----------] 3 tests from FatalFailureTest`,
349 `-[ RUN      ] FatalFailureTest.FatalFailureInSubroutine`,
350 `+ull)m[----------] 3 tests from FatalFailureTest`,
351 `+ull)m[ RUN      ] FatalFailureTest.FatalFailureInSubroutine`,
352 ` (expecting a failure that x should be 1)`,
353 ` gtest_output_test_.cc:#: Failure`,
354 ` Expected equality of these values:`,
355 `@@ -68,7 +68,7 @@`,
356 ``,
357 `   x`,
358 `     Which is: 2`,
359 ` [  FAILED  ] FatalFailureTest.FatalFailureInSubroutine`,
360 `-[ RUN      ] FatalFailureTest.FatalFailureInNestedSubroutine`,
361 `+ull)m[ RUN      ] FatalFailureTest.FatalFailureInNestedSubroutine`,
362 ` (expecting a failure that x should be 1)`,
363 ` gtest_output_test_.cc:#: Failure`,
364 ` Expected equality of these values:`,
365 `@@ -76,15 +76,15 @@`,
366 ``,
367 `   x`,
368 `     Which is: 2`,
369 ` [  FAILED  ] FatalFailureTest.FatalFailureInNestedSubroutine`,
370 `-[ RUN      ] FatalFailureTest.NonfatalFailureInSubroutine`,
371 `+ull)m[ RUN      ] FatalFailureTest.NonfatalFailureInSubroutine`,
372 ` (expecting a failure on false)`,
373 ` gtest_output_test_.cc:#: Failure`,
374 ` Value of: false`,
375 `   Actual: false`,
376 ` Expected: true`,
377 ` [  FAILED  ] FatalFailureTest.NonfatalFailureInSubroutine`,
378 `-[----------] 1 test from LoggingTest`,
379 `-[ RUN      ] LoggingTest.InterleavingLoggingAndAssertions`,
380 `+ull)m[----------] 1 test from LoggingTest`,
381 `+ull)m[ RUN      ] LoggingTest.InterleavingLoggingAndAssertions`,
382 ` (expecting 2 failures on (3) >= (a[i]))`,
383 ` i == 0`,
384 ` i == 1`,
385 `@@ -95,8 +95,8 @@`,
386 ``,
387 ` gtest_output_test_.cc:#: Failure`,
388 ` Expected: (3) >= (a[i]), actual: 3 vs 6`,
389 ` [  FAILED  ] LoggingTest.InterleavingLoggingAndAssertions`,
390 `-[----------] 6 tests from SCOPED_TRACETest`,
391 `-[ RUN      ] SCOPED_TRACETest.ObeysScopes`,
392 `+ull)m[----------] 6 tests from SCOPED_TRACETest`,
393 `+ull)m[ RUN      ] SCOPED_TRACETest.ObeysScopes`,
394 ` (expected to fail)`,
395 ` gtest_output_test_.cc:#: Failure`,
396 ` Failed`,
397 `@@ -110,7 +110,7 @@`,
398 ``,
399 ` Failed`,
400 ` This failure is expected, and shouldn't have a trace.`,
401 ` [  FAILED  ] SCOPED_TRACETest.ObeysScopes`,
402 `-[ RUN      ] SCOPED_TRACETest.WorksInLoop`,
403 `+ull)m[ RUN      ] SCOPED_TRACETest.WorksInLoop`,
404 ` (expected to fail)`,
405 ` gtest_output_test_.cc:#: Failure`,
406 ` Expected equality of these values:`,
407 `@@ -127,7 +127,7 @@`,
408 ``,
409 ` Google Test trace:`,
410 ` gtest_output_test_.cc:#: i = 2`,
411 ` [  FAILED  ] SCOPED_TRACETest.WorksInLoop`,
412 `-[ RUN      ] SCOPED_TRACETest.WorksInSubroutine`,
413 `+ull)m[ RUN      ] SCOPED_TRACETest.WorksInSubroutine`,
414 ` (expected to fail)`,
415 ` gtest_output_test_.cc:#: Failure`,
416 ` Expected equality of these values:`,
417 `@@ -144,7 +144,7 @@`,
418 ``,
419 ` Google Test trace:`,
420 ` gtest_output_test_.cc:#: n = 2`,
421 ` [  FAILED  ] SCOPED_TRACETest.WorksInSubroutine`,
422 `-[ RUN      ] SCOPED_TRACETest.CanBeNested`,
423 `+ull)m[ RUN      ] SCOPED_TRACETest.CanBeNested`,
424 ` (expected to fail)`,
425 ` gtest_output_test_.cc:#: Failure`,
426 ` Expected equality of these values:`,
427 `@@ -155,7 +155,7 @@`,
428 ``,
429 ` gtest_output_test_.cc:#: n = 2`,
430 ` gtest_output_test_.cc:#:`,
431 ` [  FAILED  ] SCOPED_TRACETest.CanBeNested`,
432 `-[ RUN      ] SCOPED_TRACETest.CanBeRepeated`,
433 `+ull)m[ RUN      ] SCOPED_TRACETest.CanBeRepeated`,
434 ` (expected to fail)`,
435 ` gtest_output_test_.cc:#: Failure`,
436 ` Failed`,
437 `@@ -183,7 +183,7 @@`,
438 ``,
439 ` gtest_output_test_.cc:#: B`,
440 ` gtest_output_test_.cc:#: A`,
441 ` [  FAILED  ] SCOPED_TRACETest.CanBeRepeated`,
442 `-[ RUN      ] SCOPED_TRACETest.WorksConcurrently`,
443 `+ull)m[ RUN      ] SCOPED_TRACETest.WorksConcurrently`,
444 ` (expecting 6 failures)`,
445 ` gtest_output_test_.cc:#: Failure`,
446 ` Failed`,
447 `@@ -212,8 +212,8 @@`,
448 ``,
449 ` Failed`,
450 ` Expected failure #6 (in thread A, no trace alive).`,
451 ` [  FAILED  ] SCOPED_TRACETest.WorksConcurrently`,
452 `-[----------] 1 test from NonFatalFailureInFixtureConstructorTest`,
453 `-[ RUN      ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor`,
454 `+ull)m[----------] 1 test from NonFatalFailureInFixtureConstructorTest`,
455 `+ull)m[ RUN      ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor`,
456 ` (expecting 5 failures)`,
457 ` gtest_output_test_.cc:#: Failure`,
458 ` Failed`,
459 `@@ -231,8 +231,8 @@`,
460 ``,
461 ` Failed`,
462 ` Expected failure #5, in the test fixture d'tor.`,
463 ` [  FAILED  ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor`,
464 `-[----------] 1 test from FatalFailureInFixtureConstructorTest`,
465 `-[ RUN      ] FatalFailureInFixtureConstructorTest.FailureInConstructor`,
466 `+ull)m[----------] 1 test from FatalFailureInFixtureConstructorTest`,
467 `+ull)m[ RUN      ] FatalFailureInFixtureConstructorTest.FailureInConstructor`,
468 ` (expecting 2 failures)`,
469 ` gtest_output_test_.cc:#: Failure`,
470 ` Failed`,
471 `@@ -241,8 +241,8 @@`,
472 ``,
473 ` Failed`,
474 ` Expected failure #2, in the test fixture d'tor.`,
475 ` [  FAILED  ] FatalFailureInFixtureConstructorTest.FailureInConstructor`,
476 `-[----------] 1 test from NonFatalFailureInSetUpTest`,
477 `-[ RUN      ] NonFatalFailureInSetUpTest.FailureInSetUp`,
478 `+ull)m[----------] 1 test from NonFatalFailureInSetUpTest`,
479 `+ull)m[ RUN      ] NonFatalFailureInSetUpTest.FailureInSetUp`,
480 ` (expecting 4 failures)`,
481 ` gtest_output_test_.cc:#: Failure`,
482 ` Failed`,
483 `@@ -257,8 +257,8 @@`,
484 ``,
485 ` Failed`,
486 ` Expected failure #4, in the test fixture d'tor.`,
487 ` [  FAILED  ] NonFatalFailureInSetUpTest.FailureInSetUp`,
488 `-[----------] 1 test from FatalFailureInSetUpTest`,
489 `-[ RUN      ] FatalFailureInSetUpTest.FailureInSetUp`,
490 `+ull)m[----------] 1 test from FatalFailureInSetUpTest`,
491 `+ull)m[ RUN      ] FatalFailureInSetUpTest.FailureInSetUp`,
492 ` (expecting 3 failures)`,
493 ` gtest_output_test_.cc:#: Failure`,
494 ` Failed`,
495 `@@ -270,18 +270,18 @@`,
496 ``,
497 ` Failed`,
498 ` Expected failure #3, in the test fixture d'tor.`,
499 ` [  FAILED  ] FatalFailureInSetUpTest.FailureInSetUp`,
500 `-[----------] 1 test from AddFailureAtTest`,
501 `-[ RUN      ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber`,
502 `+ull)m[----------] 1 test from AddFailureAtTest`,
503 `+ull)m[ RUN      ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber`,
504 ` foo.cc:42: Failure`,
505 ` Failed`,
506 ` Expected failure in foo.cc`,
507 ` [  FAILED  ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber`,
508 `-[----------] 4 tests from MixedUpTestCaseTest`,
509 `-[ RUN      ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo`,
510 `-[       OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo`,
511 `-[ RUN      ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo`,
512 `-[       OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo`,
513 `-[ RUN      ] MixedUpTestCaseTest.ThisShouldFail`,
514 `+ull)m[----------] 4 tests from MixedUpTestCaseTest`,
515 `+ull)m[ RUN      ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo`,
516 `+ull)m[       OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo`,
517 `+ull)m[ RUN      ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo`,
518 `+ull)m[       OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo`,
519 `+ull)m[ RUN      ] MixedUpTestCaseTest.ThisShouldFail`,
520 ` gtest.cc:#: Failure`,
521 ` Failed`,
522 ` All tests in the same test case must use the same test fixture`,
523 `@@ -292,7 +292,7 @@`,
524 ``,
525 ` units and have the same name.  You should probably rename one`,
526 ` of the classes to put the tests into different test cases.`,
527 ` [  FAILED  ] MixedUpTestCaseTest.ThisShouldFail`,
528 `-[ RUN      ] MixedUpTestCaseTest.ThisShouldFailToo`,
529 `+ull)m[ RUN      ] MixedUpTestCaseTest.ThisShouldFailToo`,
530 ` gtest.cc:#: Failure`,
531 ` Failed`,
532 ` All tests in the same test case must use the same test fixture`,
533 `@@ -303,10 +303,10 @@`,
534 ``,
535 ` units and have the same name.  You should probably rename one`,
536 ` of the classes to put the tests into different test cases.`,
537 ` [  FAILED  ] MixedUpTestCaseTest.ThisShouldFailToo`,
538 `-[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest`,
539 `-[ RUN      ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
540 `-[       OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
541 `-[ RUN      ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
542 `+ull)m[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest`,
543 `+ull)m[ RUN      ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
544 `+ull)m[       OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
545 `+ull)m[ RUN      ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
546 ` gtest.cc:#: Failure`,
547 ` Failed`,
548 ` All tests in the same test case must use the same test fixture`,
549 `@@ -317,10 +317,10 @@`,
550 ``,
551 ` units and have the same name.  You should probably rename one`,
552 ` of the classes to put the tests into different test cases.`,
553 ` [  FAILED  ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail`,
554 `-[----------] 2 tests from TEST_F_before_TEST_in_same_test_case`,
555 `-[ RUN      ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F`,
556 `-[       OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F`,
557 `-[ RUN      ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail`,
558 `+ull)m[----------] 2 tests from TEST_F_before_TEST_in_same_test_case`,
559 `+ull)m[ RUN      ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F`,
560 `+ull)m[       OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F`,
561 `+ull)m[ RUN      ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail`,
562 ` gtest.cc:#: Failure`,
563 ` Failed`,
564 ` All tests in the same test case must use the same test fixture`,
565 `@@ -331,10 +331,10 @@`,
566 ``,
567 ` want to change the TEST to TEST_F or move it to another test`,
568 ` case.`,
569 ` [  FAILED  ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail`,
570 `-[----------] 2 tests from TEST_before_TEST_F_in_same_test_case`,
571 `-[ RUN      ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST`,
572 `-[       OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST`,
573 `-[ RUN      ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail`,
574 `+ull)m[----------] 2 tests from TEST_before_TEST_F_in_same_test_case`,
575 `+ull)m[ RUN      ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST`,
576 `+ull)m[       OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST`,
577 `+ull)m[ RUN      ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail`,
578 ` gtest.cc:#: Failure`,
579 ` Failed`,
580 ` All tests in the same test case must use the same test fixture`,
581 `@@ -345,20 +345,20 @@`,
582 ``,
583 ` want to change the TEST to TEST_F or move it to another test`,
584 ` case.`,
585 ` [  FAILED  ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail`,
586 `-[----------] 8 tests from ExpectNonfatalFailureTest`,
587 `-[ RUN      ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables`,
588 `-[       OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables`,
589 `-[ RUN      ] ExpectNonfatalFailureTest.CanReferenceLocalVariables`,
590 `-[       OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables`,
591 `-[ RUN      ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure`,
592 `-[       OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure`,
593 `-[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure`,
594 `+ull)m[----------] 8 tests from ExpectNonfatalFailureTest`,
595 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables`,
596 `+ull)m[       OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables`,
597 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.CanReferenceLocalVariables`,
598 `+ull)m[       OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables`,
599 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure`,
600 `+ull)m[       OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure`,
601 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure`,
602 ` (expecting a failure)`,
603 ` gtest.cc:#: Failure`,
604 ` Expected: 1 non-fatal failure`,
605 `   Actual: 0 failures`,
606 ` [  FAILED  ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure`,
607 `-[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures`,
608 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures`,
609 ` (expecting a failure)`,
610 ` gtest.cc:#: Failure`,
611 ` Expected: 1 non-fatal failure`,
612 `@@ -372,7 +372,7 @@`,
613 ``,
614 ` Expected non-fatal failure 2.`,
615 ``,
616 ` [  FAILED  ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures`,
617 `-[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure`,
618 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure`,
619 ` (expecting a failure)`,
620 ` gtest.cc:#: Failure`,
621 ` Expected: 1 non-fatal failure`,
622 `@@ -382,32 +382,32 @@`,
623 ``,
624 ` Expected fatal failure.`,
625 ``,
626 ` [  FAILED  ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure`,
627 `-[ RUN      ] ExpectNonfatalFailureTest.FailsWhenStatementReturns`,
628 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.FailsWhenStatementReturns`,
629 ` (expecting a failure)`,
630 ` gtest.cc:#: Failure`,
631 ` Expected: 1 non-fatal failure`,
632 `   Actual: 0 failures`,
633 ` [  FAILED  ] ExpectNonfatalFailureTest.FailsWhenStatementReturns`,
634 `-[ RUN      ] ExpectNonfatalFailureTest.FailsWhenStatementThrows`,
635 `+ull)m[ RUN      ] ExpectNonfatalFailureTest.FailsWhenStatementThrows`,
636 ` (expecting a failure)`,
637 ` gtest.cc:#: Failure`,
638 ` Expected: 1 non-fatal failure`,
639 `   Actual: 0 failures`,
640 ` [  FAILED  ] ExpectNonfatalFailureTest.FailsWhenStatementThrows`,
641 `-[----------] 8 tests from ExpectFatalFailureTest`,
642 `-[ RUN      ] ExpectFatalFailureTest.CanReferenceGlobalVariables`,
643 `-[       OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables`,
644 `-[ RUN      ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables`,
645 `-[       OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables`,
646 `-[ RUN      ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure`,
647 `-[       OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure`,
648 `-[ RUN      ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure`,
649 `+ull)m[----------] 8 tests from ExpectFatalFailureTest`,
650 `+ull)m[ RUN      ] ExpectFatalFailureTest.CanReferenceGlobalVariables`,
651 `+ull)m[       OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables`,
652 `+ull)m[ RUN      ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables`,
653 `+ull)m[       OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables`,
654 `+ull)m[ RUN      ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure`,
655 `+ull)m[       OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure`,
656 `+ull)m[ RUN      ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure`,
657 ` (expecting a failure)`,
658 ` gtest.cc:#: Failure`,
659 ` Expected: 1 fatal failure`,
660 `   Actual: 0 failures`,
661 ` [  FAILED  ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure`,
662 `-[ RUN      ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures`,
663 `+ull)m[ RUN      ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures`,
664 ` (expecting a failure)`,
665 ` gtest.cc:#: Failure`,
666 ` Expected: 1 fatal failure`,
667 `@@ -421,7 +421,7 @@`,
668 ``,
669 ` Expected fatal failure.`,
670 ``,
671 ` [  FAILED  ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures`,
672 `-[ RUN      ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure`,
673 `+ull)m[ RUN      ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure`,
674 ` (expecting a failure)`,
675 ` gtest.cc:#: Failure`,
676 ` Expected: 1 fatal failure`,
677 `@@ -431,22 +431,22 @@`,
678 ``,
679 ` Expected non-fatal failure.`,
680 ``,
681 ` [  FAILED  ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure`,
682 `-[ RUN      ] ExpectFatalFailureTest.FailsWhenStatementReturns`,
683 `+ull)m[ RUN      ] ExpectFatalFailureTest.FailsWhenStatementReturns`,
684 ` (expecting a failure)`,
685 ` gtest.cc:#: Failure`,
686 ` Expected: 1 fatal failure`,
687 `   Actual: 0 failures`,
688 ` [  FAILED  ] ExpectFatalFailureTest.FailsWhenStatementReturns`,
689 `-[ RUN      ] ExpectFatalFailureTest.FailsWhenStatementThrows`,
690 `+ull)m[ RUN      ] ExpectFatalFailureTest.FailsWhenStatementThrows`,
691 ` (expecting a failure)`,
692 ` gtest.cc:#: Failure`,
693 ` Expected: 1 fatal failure`,
694 `   Actual: 0 failures`,
695 ` [  FAILED  ] ExpectFatalFailureTest.FailsWhenStatementThrows`,
696 `-[----------] 2 tests from TypedTest/0, where TypeParam = int`,
697 `-[ RUN      ] TypedTest/0.Success`,
698 `-[       OK ] TypedTest/0.Success`,
699 `-[ RUN      ] TypedTest/0.Failure`,
700 `+ull)m[----------] 2 tests from TypedTest/0, where TypeParam = int`,
701 `+ull)m[ RUN      ] TypedTest/0.Success`,
702 `+ull)m[       OK ] TypedTest/0.Success`,
703 `+ull)m[ RUN      ] TypedTest/0.Failure`,
704 ` gtest_output_test_.cc:#: Failure`,
705 ` Expected equality of these values:`,
706 `   1`,
707 `@@ -454,10 +454,10 @@`,
708 ``,
709 `     Which is: 0`,
710 ` Expected failure`,
711 ` [  FAILED  ] TypedTest/0.Failure, where TypeParam = int`,
712 `-[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char`,
713 `-[ RUN      ] Unsigned/TypedTestP/0.Success`,
714 `-[       OK ] Unsigned/TypedTestP/0.Success`,
715 `-[ RUN      ] Unsigned/TypedTestP/0.Failure`,
716 `+ull)m[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char`,
717 `+ull)m[ RUN      ] Unsigned/TypedTestP/0.Success`,
718 `+ull)m[       OK ] Unsigned/TypedTestP/0.Success`,
719 `+ull)m[ RUN      ] Unsigned/TypedTestP/0.Failure`,
720 ` gtest_output_test_.cc:#: Failure`,
721 ` Expected equality of these values:`,
722 `   1U`,
723 `@@ -466,10 +466,10 @@`,
724 ``,
725 `     Which is: '\0'`,
726 ` Expected failure`,
727 ` [  FAILED  ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char`,
728 `-[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned`,
729 `-[ RUN      ] Unsigned/TypedTestP/1.Success`,
730 `-[       OK ] Unsigned/TypedTestP/1.Success`,
731 `-[ RUN      ] Unsigned/TypedTestP/1.Failure`,
732 `+ull)m[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned`,
733 `+ull)m[ RUN      ] Unsigned/TypedTestP/1.Success`,
734 `+ull)m[       OK ] Unsigned/TypedTestP/1.Success`,
735 `+ull)m[ RUN      ] Unsigned/TypedTestP/1.Failure`,
736 ` gtest_output_test_.cc:#: Failure`,
737 ` Expected equality of these values:`,
738 `   1U`,
739 `@@ -478,8 +478,8 @@`,
740 ``,
741 `     Which is: 0`,
742 ` Expected failure`,
743 ` [  FAILED  ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned`,
744 `-[----------] 4 tests from ExpectFailureTest`,
745 `-[ RUN      ] ExpectFailureTest.ExpectFatalFailure`,
746 `+ull)m[----------] 4 tests from ExpectFailureTest`,
747 `+ull)m[ RUN      ] ExpectFailureTest.ExpectFatalFailure`,
748 ` (expecting 1 failure)`,
749 ` gtest.cc:#: Failure`,
750 ` Expected: 1 fatal failure`,
751 `@@ -504,7 +504,7 @@`,
752 ``,
753 ` Expected fatal failure.`,
754 ``,
755 ` [  FAILED  ] ExpectFailureTest.ExpectFatalFailure`,
756 `-[ RUN      ] ExpectFailureTest.ExpectNonFatalFailure`,
757 `+ull)m[ RUN      ] ExpectFailureTest.ExpectNonFatalFailure`,
758 ` (expecting 1 failure)`,
759 ` gtest.cc:#: Failure`,
760 ` Expected: 1 non-fatal failure`,
761 `@@ -529,7 +529,7 @@`,
762 ``,
763 ` Expected non-fatal failure.`,
764 ``,
765 ` [  FAILED  ] ExpectFailureTest.ExpectNonFatalFailure`,
766 `-[ RUN      ] ExpectFailureTest.ExpectFatalFailureOnAllThreads`,
767 `+ull)m[ RUN      ] ExpectFailureTest.ExpectFatalFailureOnAllThreads`,
768 ` (expecting 1 failure)`,
769 ` gtest.cc:#: Failure`,
770 ` Expected: 1 fatal failure`,
771 `@@ -554,7 +554,7 @@`,
772 ``,
773 ` Expected fatal failure.`,
774 ``,
775 ` [  FAILED  ] ExpectFailureTest.ExpectFatalFailureOnAllThreads`,
776 `-[ RUN      ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads`,
777 `+ull)m[ RUN      ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads`,
778 ` (expecting 1 failure)`,
779 ` gtest.cc:#: Failure`,
780 ` Expected: 1 non-fatal failure`,
781 `@@ -579,8 +579,8 @@`,
782 ``,
783 ` Expected non-fatal failure.`,
784 ``,
785 ` [  FAILED  ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads`,
786 `-[----------] 2 tests from ExpectFailureWithThreadsTest`,
787 `-[ RUN      ] ExpectFailureWithThreadsTest.ExpectFatalFailure`,
788 `+ull)m[----------] 2 tests from ExpectFailureWithThreadsTest`,
789 `+ull)m[ RUN      ] ExpectFailureWithThreadsTest.ExpectFatalFailure`,
790 ` (expecting 2 failures)`,
791 ` gtest_output_test_.cc:#: Failure`,
792 ` Failed`,
793 `@@ -589,7 +589,7 @@`,
794 ``,
795 ` Expected: 1 fatal failure`,
796 `   Actual: 0 failures`,
797 ` [  FAILED  ] ExpectFailureWithThreadsTest.ExpectFatalFailure`,
798 `-[ RUN      ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure`,
799 `+ull)m[ RUN      ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure`,
800 ` (expecting 2 failures)`,
801 ` gtest_output_test_.cc:#: Failure`,
802 ` Failed`,
803 `@@ -598,8 +598,8 @@`,
804 ``,
805 ` Expected: 1 non-fatal failure`,
806 `   Actual: 0 failures`,
807 ` [  FAILED  ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure`,
808 `-[----------] 1 test from ScopedFakeTestPartResultReporterTest`,
809 `-[ RUN      ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread`,
810 `+ull)m[----------] 1 test from ScopedFakeTestPartResultReporterTest`,
811 `+ull)m[ RUN      ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread`,
812 ` (expecting 2 failures)`,
813 ` gtest_output_test_.cc:#: Failure`,
814 ` Failed`,
815 `@@ -608,18 +608,18 @@`,
816 ``,
817 ` Failed`,
818 ` Expected non-fatal failure.`,
819 ` [  FAILED  ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread`,
820 `-[----------] 1 test from PrintingFailingParams/FailingParamTest`,
821 `-[ RUN      ] PrintingFailingParams/FailingParamTest.Fails/0`,
822 `+ull)m[----------] 1 test from PrintingFailingParams/FailingParamTest`,
823 `+ull)m[ RUN      ] PrintingFailingParams/FailingParamTest.Fails/0`,
824 ` gtest_output_test_.cc:#: Failure`,
825 ` Expected equality of these values:`,
826 `   1`,
827 `   GetParam()`,
828 `     Which is: 2`,
829 ` [  FAILED  ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2`,
830 `-[----------] 2 tests from PrintingStrings/ParamTest`,
831 `-[ RUN      ] PrintingStrings/ParamTest.Success/a`,
832 `-[       OK ] PrintingStrings/ParamTest.Success/a`,
833 `-[ RUN      ] PrintingStrings/ParamTest.Failure/a`,
834 `+ull)m[----------] 2 tests from PrintingStrings/ParamTest`,
835 `+ull)m[ RUN      ] PrintingStrings/ParamTest.Success/a`,
836 `+ull)m[       OK ] PrintingStrings/ParamTest.Success/a`,
837 `+ull)m[ RUN      ] PrintingStrings/ParamTest.Failure/a`,
838 ` gtest_output_test_.cc:#: Failure`,
839 ` Expected equality of these values:`,
840 `   "b"`,
841 `@@ -627,7 +627,7 @@`,
842 ``,
843 `     Which is: "a"`,
844 ` Expected failure`,
845 ` [  FAILED  ] PrintingStrings/ParamTest.Failure/a, where GetParam() = "a"`,
846 `-[----------] Global test environment tear-down`,
847 `+ull)m[----------] Global test environment tear-down`,
848 ` BarEnvironment::TearDown() called.`,
849 ` gtest_output_test_.cc:#: Failure`,
850 ` Failed`,
851 `@@ -636,8 +636,8 @@`,
852 ``,
853 ` gtest_output_test_.cc:#: Failure`,
854 ` Failed`,
855 ` Expected fatal failure.`,
856 `+ull)m[==========] 66 tests from 29 test cases ran.`,
857 `+ull)m[  PASSED  ] 22 tests.`,
858 ` [  FAILED  ] 44 tests, listed below:`,
859 ` [  FAILED  ] NonfatalFailureTest.EscapesStringOperands`,
860 ` [  FAILED  ] NonfatalFailureTest.DiffForLongStrings`,
861         ];
862         // dfmt on
863 }
864 
865 string[] testData3() {
866     // this contains a little fuzzy data that the parser should be able to
867     // handle. this is what typically can happen when running tets from via
868     // a makefile.
869     // dfmt off
870         return [
871 `Running main() from gtest_main.cc`,
872 `[==========] Running 4 tests from 1 test case.`,
873 `[----------] Global test environment set-up.`,
874 `[----------] 4 tests from MessageTest`,
875 `[ RUN      ] Comp.A`,
876 `[       OK ] Comp.A (0 ms)`,
877 `[ RUN      ] Comp.B`,
878 `[       OK ] Comp.B (0 ms) [ RUN      ] Comp.C`,
879 `[       OK ] Comp.C (0 ms)`,
880 `[ RUN      ] Comp.D`,
881 `[       OK ] Comp.D (0 ms)`,
882 `[ RUN      ] Comp.E/a[       OK ] Comp.E/a (0 ms)[ RUN      ] Comp.E/b[       OK ] Comp.E/b (0 ms)`,
883 `[----------] 4 tests from Comp (0 ms total)`,
884 ``,
885 `[----------] Global test environment tear-down`,
886 `[==========] 4 tests from 1 test case ran. (0 ms total)`,
887 `[  PASSED  ] 4 tests.`,
888         ];
889         // dfmt on
890 }
891 
892 string[] testData4() {
893     // dfmt off
894         return [
895 "Running main() from gtest_main.cc",
896 "[==========] Running 17 tests from 1 test case.",
897 "[----------] Global test environment set-up.",
898 "[----------] 17 tests from MessageTest",
899 "[ RUN      ] Foo.A",
900 "[ FAILED   ] Foo.A (0 ms)[ RUN      ] Foo.B[ FAILED   ] Foo.B (0 ms)[ RUN      ] Foo.C[ FAILED   ] Foo.C (0 ms)",
901 "[ RUN      ] Foo.D[ FAILED   ] Foo.D (0 ms)[ RUN      ] Foo.E",
902 "[ FAILED   ] Foo.E (0 ms)",
903 "[----------] 3 tests from MessageTest (0 ms total)",
904         ];
905         // dfmt on
906 }
907 
908 string[] testData5() {
909     // dfmt off
910         return [
911 "35: [==========] Running 13 tests from 3 test cases.",
912 "35: [----------] Global test environment set-up.",
913 "35: [----------] 1 test from BarDeathTest",
914 "35: [ RUN      ] BarDeathTest.ThreadSafeAndFast",
915 "35: [       OK ] BarDeathTest.ThreadSafeAndFast (436 ms)",
916 "35: [----------] 1 test from BarDeathTest (436 ms total)",
917 "35: [----------] 10 tests from MyParamSequence/MyParamTest",
918 "35: [ RUN      ] MyParamSequence/MyParamTest.ShouldPass/0",
919 "35: [       OK ] MyParamSequence/MyParamTest.ShouldPass/0 (0 ms)",
920 "35: [ RUN      ] MyParamSequence/MyParamTest.ShouldPass/1",
921 "35: [       OK ] MyParamSequence/MyParamTest.ShouldPass/1 (0 ms)",
922 "35: [----------] 2  tests from MyParamSequence/MyParamTest (0 ms total)",
923 "35: ",
924 "35: [----------] 2 tests from FooTest",
925 "35: [ RUN      ] FooTest.ShouldFail",
926 "35: /home/joker/src/cpp/googletest/googletest/test/gtest_repeat_test.cc:96: Failure",
927 "35: Expected equality of these values:",
928 "35:   0",
929 "35:   1",
930 "35: Expected failure.",
931 "35: [  FAILED  ] FooTest.ShouldFail (0 ms)",
932 "35: [ RUN      ] FooTest.ShouldPass",
933 "35: [       OK ] FooTest.ShouldPass (0 ms)",
934 "35: [----------] 2 tests from FooTest (0 ms total)",
935 "35: [----------] Global test environment tear-down",
936 "35: [==========] 13 tests from 3 test cases ran. (436 ms total)",
937 "35: [  PASSED  ] 12 tests.",
938 "35: [  FAILED  ] 1 test, listed below:",
939 "35: [  FAILED  ] FooTest.ShouldFail",
940         ];
941         // dfmt on
942 }
943 }