summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phonenumbers/geocoding/geocoding_test_program.cc6
-rw-r--r--phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc3
2 files changed, 5 insertions, 4 deletions
diff --git a/phonenumbers/geocoding/geocoding_test_program.cc b/phonenumbers/geocoding/geocoding_test_program.cc
index dec55a4..63b2b7a 100644
--- a/phonenumbers/geocoding/geocoding_test_program.cc
+++ b/phonenumbers/geocoding/geocoding_test_program.cc
@@ -15,10 +15,10 @@
// Sample program using the geocoding functionality. This is used to test that
// the geocoding library is compiled correctly.
-#include <cassert>
#include <iostream>
#include <string>
+#include "phonenumbers/base/logging.h"
#include "phonenumbers/geocoding/phonenumber_offline_geocoder.h"
#include "phonenumbers/phonenumber.pb.h"
#include "phonenumbers/phonenumberutil.h"
@@ -32,12 +32,12 @@ int main() {
const PhoneNumberUtil& phone_util = *PhoneNumberUtil::GetInstance();
const PhoneNumberUtil::ErrorType status = phone_util.Parse(
"16502530000", "US", &number);
- assert(status == PhoneNumberUtil::NO_PARSING_ERROR);
+ CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR);
const std::string description =
PhoneNumberOfflineGeocoder().GetDescriptionForNumber(
number, icu::Locale("en", "GB"));
std::cout << description << std::endl;
- assert(description == "Mountain View, CA");
+ CHECK_EQ(description, "Mountain View, CA");
return 0;
}
diff --git a/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc b/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc
index efeea36..c2e1295 100644
--- a/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc
+++ b/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc
@@ -190,7 +190,8 @@ TEST_F(PhoneNumberOfflineGeocoderTest,
// Invalid number - return an empty string.
EXPECT_EQ("",
geocoder_->GetDescriptionForNumber(US_INVALID_NUMBER,
- kEnglishLocale, "US"));
+ kEnglishLocale,
+ "US"));
}
TEST_F(PhoneNumberOfflineGeocoderTest, TestGetDescriptionForInvalidNumber) {