Ticket #52231: patch-src-phonenumberutil_test.cc.diff

File patch-src-phonenumberutil_test.cc.diff, 1.4 KB (added by arboz, 8 years ago)

sample src-patch to fix Long values in cpp/test libphonenumber-cpp

  • work/libphonenumber-7.6.1/cpp/test/phonenumbers/phonenumberutil_test.cc

    old new  
    11571157  // added before dialing from a mobile phone for regular length numbers, but
    11581158  // not for short numbers.
    11591159  test_number.set_country_code(36);
    1160   test_number.set_national_number(301234567L);
     1160  test_number.set_national_number(301234567ULL);
    11611161  phone_util_.FormatNumberForMobileDialing(
    11621162      test_number, RegionCode::HU(), false, &formatted_number);
    11631163  EXPECT_EQ("06301234567", formatted_number);
     
    11761176  // numbers are always output in international format, but short numbers are
    11771177  // in national format.
    11781178  test_number.set_country_code(1);
    1179   test_number.set_national_number(6502530000L);
     1179  test_number.set_national_number(6502530000ULL);
    11801180  phone_util_.FormatNumberForMobileDialing(
    11811181      test_number, RegionCode::US(), false, &formatted_number);
    11821182  EXPECT_EQ("+16502530000", formatted_number);
     
    13651365
    13661366  // A mobile number in Argentina also has an area code.
    13671367  number.set_country_code(54);
    1368   number.set_national_number(91187654321);
     1368  number.set_national_number(91187654321ULL);
    13691369  EXPECT_EQ(3, phone_util_.GetLengthOfGeographicalAreaCode(number));
    13701370
    13711371  // Google Sydney, which has area code "2".