CPP: Adjust phonenumbermatch_test.cc integer types.
authorphilip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Fri, 1 Jun 2012 14:36:48 +0000 (14:36 +0000)
committerphilip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Fri, 1 Jun 2012 14:36:48 +0000 (14:36 +0000)
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@461 ee073f10-1060-11df-b6a4-87a95322a99c

cpp/test/phonenumbers/phonenumbermatch_test.cc

index 0064115..3b7b093 100644 (file)
@@ -33,8 +33,9 @@ TEST(PhoneNumberMatch, TestGetterMethods) {
   PhoneNumberMatch match1(start_index, raw_phone_number, number);
 
   EXPECT_EQ(start_index, match1.start());
   PhoneNumberMatch match1(start_index, raw_phone_number, number);
 
   EXPECT_EQ(start_index, match1.start());
-  EXPECT_EQ(start_index + raw_phone_number.length(), match1.end());
-  EXPECT_EQ(raw_phone_number.length(), match1.length());
+  EXPECT_EQ(start_index + static_cast<int>(raw_phone_number.length()),
+            match1.end());
+  EXPECT_EQ(static_cast<int>(raw_phone_number.length()), match1.length());
   EXPECT_EQ(raw_phone_number, match1.raw_string());
 
   EXPECT_EQ("PhoneNumberMatch [10,25) 1 800 234 45 67", match1.ToString());
   EXPECT_EQ(raw_phone_number, match1.raw_string());
 
   EXPECT_EQ("PhoneNumberMatch [10,25) 1 800 234 45 67", match1.ToString());