From 97ef1c705eb24945cf4a2bca9eafe5357281703b Mon Sep 17 00:00:00 2001 From: vladlosev Date: Mon, 24 Oct 2011 18:33:26 +0000 Subject: [PATCH] Changes to fix gtest-printers_test on VC++ 2010. --- test/gtest-printers_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/gtest-printers_test.cc b/test/gtest-printers_test.cc index 6292c7f2..58044ab5 100644 --- a/test/gtest-printers_test.cc +++ b/test/gtest-printers_test.cc @@ -197,6 +197,7 @@ using ::std::pair; using ::std::set; using ::std::vector; using ::testing::PrintToString; +using ::testing::internal::ImplicitCast_; using ::testing::internal::NativeArray; using ::testing::internal::RE; using ::testing::internal::Strings; @@ -1002,9 +1003,12 @@ TEST(PrintTupleTest, VariousSizes) { EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true, 9)", Print(t9)); const char* const str = "8"; + // VC++ 2010's implementation of tuple of C++0x is deficient, requiring + // an explicit type cast of NULL to be used. tuple - t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str, NULL, "10"); + t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str, + ImplicitCast_(NULL), "10"); EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) + " pointing to \"8\", NULL, \"10\")", Print(t10));