Browse Source

CPP: Fix logger and asyoutypeformatter unit test to let the latest release build in Chromium.

pull/567/head
Philippe Liard 14 years ago
committed by Mihaela Rosca
parent
commit
aa50718d6e
2 changed files with 10 additions and 1 deletions
  1. +9
    -0
      cpp/src/phonenumbers/default_logger.h
  2. +1
    -1
      cpp/test/phonenumbers/asyoutypeformatter_test.cc

+ 9
- 0
cpp/src/phonenumbers/default_logger.h View File

@ -22,6 +22,15 @@
namespace i18n {
namespace phonenumbers {
// There is no Logger in the new base implementation - provide a NOP one.
class Logger {
public:
Logger() {}
virtual ~Logger() {}
static void set_logger_impl(Logger*) {}
};
// If Google base/ is used, LOG() and VLOG() from base/logging.h are used
// therefore the default logger implementation (StdoutLogger) instantiated in
// phonenumberutil will actually never be used. Thus provide a dummy


+ 1
- 1
cpp/test/phonenumbers/asyoutypeformatter_test.cc View File

@ -34,7 +34,7 @@ class AsYouTypeFormatterTest : public testing::Test {
}
const PhoneMetadata* GetCurrentMetadata() const {
return CHECK_NOTNULL(formatter_.get())->current_metadata_;
return formatter_.get()->current_metadata_;
}
int ConvertUnicodeStringPosition(const UnicodeString& s, int pos) const {


Loading…
Cancel
Save