Browse Source

Fix USE_RE2 ifdef (#1862)

pull/1865/merge
Keghani Kouzoujian 9 years ago
committed by GitHub
parent
commit
6f857d731a
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      cpp/src/phonenumbers/phonenumbermatcher.cc
  2. +4
    -4
      cpp/test/phonenumbers/regexp_adapter_test.cc

+ 1
- 1
cpp/src/phonenumbers/phonenumbermatcher.cc View File

@ -53,7 +53,7 @@
#ifdef I18N_PHONENUMBERS_USE_RE2
#include "phonenumbers/regexp_adapter_re2.h"
#endif // I18N_PHONENUMBERS_USE_RE2_AND_ICU
#endif // I18N_PHONENUMBERS_USE_RE2
using std::map;
using std::numeric_limits;


+ 4
- 4
cpp/test/phonenumbers/regexp_adapter_test.cc View File

@ -26,11 +26,11 @@
#include "phonenumbers/stl_util.h"
#include "phonenumbers/stringutil.h"
#ifdef USE_RE2
#ifdef I18N_PHONENUMBERS_USE_RE2
#include "phonenumbers/regexp_adapter_re2.h"
#else
#include "phonenumbers/regexp_adapter_icu.h"
#endif // USE_RE2
#endif // I18N_PHONENUMBERS_USE_RE2
namespace i18n {
namespace phonenumbers {
@ -60,13 +60,13 @@ struct RegExpTestContext {
class RegExpAdapterTest : public testing::Test {
protected:
RegExpAdapterTest() {
#ifdef USE_RE2
#ifdef I18N_PHONENUMBERS_USE_RE2
contexts_.push_back(
new RegExpTestContext("RE2", new RE2RegExpFactory()));
#else
contexts_.push_back(
new RegExpTestContext("ICU Regex", new ICURegExpFactory()));
#endif // USE_RE2
#endif // I18N_PHONENUMBERS_USE_RE2
}
~RegExpAdapterTest() {


Loading…
Cancel
Save