Skip to content

Commit b4661bc

Browse files
author
vladlosev
committed
Changes to fix gtest-printers_test on VC++ 2010.
git-svn-id: http://googletest.googlecode.com/svn/trunk@603 861a406c-534a-0410-8894-cb66d6ee9925
1 parent 7fc9854 commit b4661bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/gtest-printers_test.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ using ::std::pair;
197197
using ::std::set;
198198
using ::std::vector;
199199
using ::testing::PrintToString;
200+
using ::testing::internal::ImplicitCast_;
200201
using ::testing::internal::NativeArray;
201202
using ::testing::internal::RE;
202203
using ::testing::internal::Strings;
@@ -1002,9 +1003,12 @@ TEST(PrintTupleTest, VariousSizes) {
10021003
EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true, 9)", Print(t9));
10031004

10041005
const char* const str = "8";
1006+
// VC++ 2010's implementation of tuple of C++0x is deficient, requiring
1007+
// an explicit type cast of NULL to be used.
10051008
tuple<bool, char, short, testing::internal::Int32, // NOLINT
10061009
testing::internal::Int64, float, double, const char*, void*, string>
1007-
t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str, NULL, "10");
1010+
t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str,
1011+
ImplicitCast_<void*>(NULL), "10");
10081012
EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
10091013
" pointing to \"8\", NULL, \"10\")",
10101014
Print(t10));

0 commit comments

Comments
 (0)