... +[----------] 1 test from FooTest +[ RUN ] FooTest.DoesAbc +[ OK ] FooTest.DoesAbc +[----------] 2 tests from BarTest +[ RUN ] BarTest.HasXyzProperty +[ OK ] BarTest.HasXyzProperty +[ RUN ] BarTest.ReturnsTrueOnSuccess +... some error messages ... +[ FAILED ] BarTest.ReturnsTrueOnSuccess +... +[==========] 30 tests from 14 test suites ran. +[ PASSED ] 28 tests. +[ FAILED ] 2 tests, listed below: +[ FAILED ] BarTest.ReturnsTrueOnSuccess +[ FAILED ] AnotherTest.DoesXyz + + 2 FAILED TESTS ++ +You can set the `GTEST_COLOR` environment variable or the `--gtest_color` +command line flag to `yes`, `no`, or `auto` (the default) to enable colors, +disable colors, or let googletest decide. When the value is `auto`, googletest +will use colors if and only if the output goes to a terminal and (on non-Windows +platforms) the `TERM` environment variable is set to `xterm` or `xterm-color`. + +#### Suppressing test passes + +By default, googletest prints 1 line of output for each test, indicating if it +passed or failed. To show only test failures, run the test program with +`--gtest_brief=1`, or set the GTEST_BRIEF environment variable to `1`. + +#### Suppressing the Elapsed Time + +By default, googletest prints the time it takes to run each test. To disable +that, run the test program with the `--gtest_print_time=0` command line flag, or +set the GTEST_PRINT_TIME environment variable to `0`. + +#### Suppressing UTF-8 Text Output + +In case of assertion failures, googletest prints expected and actual values of +type `string` both as hex-encoded strings as well as in readable UTF-8 text if +they contain valid non-ASCII UTF-8 characters. If you want to suppress the UTF-8 +text because, for example, you don't have an UTF-8 compatible output medium, run +the test program with `--gtest_print_utf8=0` or set the `GTEST_PRINT_UTF8` +environment variable to `0`. + +#### Generating an XML Report + +googletest can emit a detailed XML report to a file in addition to its normal +textual output. The report contains the duration of each test, and thus can help +you identify slow tests. + +To generate the XML report, set the `GTEST_OUTPUT` environment variable or the +`--gtest_output` flag to the string `"xml:path_to_output_file"`, which will +create the file at the given location. You can also just use the string `"xml"`, +in which case the output can be found in the `test_detail.xml` file in the +current directory. + +If you specify a directory (for example, `"xml:output/directory/"` on Linux or +`"xml:output\directory\"` on Windows), googletest will create the XML file in +that directory, named after the test executable (e.g. `foo_test.xml` for test +program `foo_test` or `foo_test.exe`). If the file already exists (perhaps left +over from a previous run), googletest will pick a different name (e.g. +`foo_test_1.xml`) to avoid overwriting it. + +The report is based on the `junitreport` Ant task. Since that format was +originally intended for Java, a little interpretation is required to make it +apply to googletest tests, as shown here: + +```xml +
| Simple | |
|---|---|
| Old | +MOCK_METHOD1(Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int)) |
+
| Const Method | |
| Old | +MOCK_CONST_METHOD1(Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (const)) |
+
| Method in a Class Template | |
| Old | +MOCK_METHOD1_T(Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int)) |
+
| Const Method in a Class Template | |
| Old | +MOCK_CONST_METHOD1_T(Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (const)) |
+
| Method with Call Type | |
| Old | +MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE))) |
+
| Const Method with Call Type | |
| Old | +MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE))) |
+
| Method with Call Type in a Class Template | |
| Old | +MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE))) |
+
| Const Method with Call Type in a Class Template | |
| Old | +MOCK_CONST_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int)) |
+
| New | +MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE))) |
+