From 9c0fe18f1cee8ed8375da54c3f178207cb8bc148 Mon Sep 17 00:00:00 2001 From: "philip.liard@gmail.com" Date: Wed, 23 May 2012 09:27:20 +0000 Subject: [PATCH] CPP: Fix stringutil_test literal types This failed with OSX 10.6 default gcc-4.2 and macports gcc-4.8. Patch contributed by pmezard. git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@458 ee073f10-1060-11df-b6a4-87a95322a99c --- cpp/test/phonenumbers/stringutil_test.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/test/phonenumbers/stringutil_test.cc b/cpp/test/phonenumbers/stringutil_test.cc index 07bd800..1b44029 100644 --- a/cpp/test/phonenumbers/stringutil_test.cc +++ b/cpp/test/phonenumbers/stringutil_test.cc @@ -55,25 +55,25 @@ TEST(StringUtilTest, FindNthWithNTooHigh) { } TEST(StringUtilTest, FindNth) { - EXPECT_EQ(7, FindNth("hello world", 'o', 2)); + EXPECT_EQ(7U, FindNth("hello world", 'o', 2)); } TEST(StringUtilTest, SplitStringUsingWithEmptyString) { vector result; SplitStringUsing("", ":", &result); - EXPECT_EQ(0, result.size()); + EXPECT_EQ(0U, result.size()); } TEST(StringUtilTest, SplitStringUsingWithEmptyDelimiter) { vector result; SplitStringUsing("hello", "", &result); - EXPECT_EQ(0, result.size()); + EXPECT_EQ(0U, result.size()); } TEST(StringUtilTest, SplitStringUsing) { vector result; SplitStringUsing(":hello:world:", ":", &result); - EXPECT_EQ(2, result.size()); + EXPECT_EQ(2U, result.size()); EXPECT_EQ("hello", result[0]); EXPECT_EQ("world", result[1]); } @@ -81,7 +81,7 @@ TEST(StringUtilTest, SplitStringUsing) { TEST(StringUtilTest, SplitStringUsingIgnoresEmptyToken) { vector result; SplitStringUsing("hello::world", ":", &result); - EXPECT_EQ(2, result.size()); + EXPECT_EQ(2U, result.size()); EXPECT_EQ("hello", result[0]); EXPECT_EQ("world", result[1]); } -- 2.7.4