diff --git a/googlemock/docs/community_created_documentation.md b/googlemock/docs/community_created_documentation.md new file mode 100644 index 00000000..dfd87f7a --- /dev/null +++ b/googlemock/docs/community_created_documentation.md @@ -0,0 +1,9 @@ +# Community-Created Documentation + +go/gunit-community-created-docs + +The following is a list, in no particular order, of links to documentation +created by the Googletest community. + +* [Googlemock Insights](https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/googletest/insights.md), + by [ElectricRCAircraftGuy](https://github.com/ElectricRCAircraftGuy) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index a5dd6226..7ca40fef 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -2288,8 +2288,7 @@ environment variable to `0`. 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. The report is also used by the http://unittest -dashboard to show per-test-method error messages. +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 diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index fabc8042..028f21eb 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -1283,8 +1283,13 @@ constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; } // Suppress MSVC warning 4072 (unreachable code) for the code following // statement if it returns or throws (or doesn't return or throw in some // situations). +// NOTE: The "else" is important to keep this expansion to prevent a top-level +// "else" from attaching to our "if". #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \ - if (::testing::internal::AlwaysTrue()) { statement; } + if (::testing::internal::AlwaysTrue()) { \ + statement; \ + } else /* NOLINT */ \ + static_assert(true, "") // User must have a semicolon after expansion. #define GTEST_TEST_THROW_(statement, expected_exception, fail) \ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index c6722800..ba6e2956 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -81,13 +81,11 @@ #elif GTEST_OS_WINDOWS // We are on Windows proper. -# include // NOLINT # include // NOLINT # undef min #ifdef _MSC_VER # include // NOLINT -# include // NOLINT #endif # include // NOLINT @@ -6290,10 +6288,10 @@ static const char kColorEncodedHelpMessage[] = " @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n" " Enable/disable colored output. The default is @Gauto@D.\n" - " -@G-" GTEST_FLAG_PREFIX_ + " @G--" GTEST_FLAG_PREFIX_ "brief=1@D\n" " Only print test failures.\n" - " -@G-" GTEST_FLAG_PREFIX_ + " @G--" GTEST_FLAG_PREFIX_ "print_time=0@D\n" " Don't print the elapsed time of each test.\n" " @G--" GTEST_FLAG_PREFIX_