Merge branch 'master' into python3-tests

This commit is contained in:
Gennadiy Civil
2018-09-20 14:30:26 -04:00
committed by GitHub
5 changed files with 32 additions and 3 deletions

View File

@@ -1112,9 +1112,25 @@ TEST(PrintStdTupleTest, NestedTuple) {
#endif // GTEST_LANG_CXX11
#if GTEST_LANG_CXX11
TEST(PrintNullptrT, Basic) {
EXPECT_EQ("(nullptr)", Print(nullptr));
}
TEST(PrintReferenceWrapper, Printable) {
int x = 5;
EXPECT_EQ("5", Print(std::ref(x)));
EXPECT_EQ("5", Print(std::cref(x)));
}
TEST(PrintReferenceWrapper, Unprintable) {
::foo::UnprintableInFoo up;
EXPECT_EQ("16-byte object <EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>",
Print(std::ref(up)));
EXPECT_EQ("16-byte object <EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>",
Print(std::cref(up)));
}
#endif // GTEST_LANG_CXX11
// Tests printing user-defined unprintable types.

View File

@@ -6826,7 +6826,7 @@ TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) {
TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
GTEST_FLAG(color) = "auto";
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
// On Windows, we ignore the TERM variable as it's usually not set.
SetEnv("TERM", "dumb");