# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") module_output_path = "libphonenumber/libphonenumber_test" config("phonenumber_test_config") { include_dirs = [ "//third_party/libphonenumber/cpp/test", "//third_party/libphonenumber/cpp/src", "//third_party/googletest/googletest/include", "//third_party/googletest/googletest", "//third_party/protobuf/src", "//third_party/icu/icu4c/source", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/protobuf/src/google", "//third_party/protobuf/src/google/protobuf", ] cflags_cc = [ "-DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS", "-DI18N_PHONENUMBERS_USE_ICU_REGEXP", "-Dphonenumber_shared_EXPORTS", "-Wall", "-Werror", "-fPIC", "-U__ANDROID__", "-Wno-sign-compare", "-Wno-error=unused-parameter", "-Wno-error=unused-const-variable", "-Wno-error=unneeded-internal-declaration", ] cflags = [ "-Wno-implicit-fallthrough" ] } ohos_unittest("libphonenumber_test") { module_out_path = module_output_path sources = [ "//third_party/googletest/googletest/src/gtest-death-test.cc", "//third_party/googletest/googletest/src/gtest-filepath.cc", "//third_party/googletest/googletest/src/gtest-internal-inl.h", "//third_party/googletest/googletest/src/gtest-port.cc", "//third_party/googletest/googletest/src/gtest-printers.cc", "//third_party/googletest/googletest/src/gtest-test-part.cc", "//third_party/googletest/googletest/src/gtest-typed-test.cc", "//third_party/googletest/googletest/src/gtest.cc", "//third_party/googletest/googletest/src/gtest_main.cc", "//third_party/googletest/googletest/src/hwext/gtest-ext.cc", "//third_party/googletest/googletest/src/hwext/gtest-filter.cc", "//third_party/googletest/googletest/src/hwext/gtest-tag.cc", "//third_party/googletest/googletest/src/hwext/gtest-utils.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/alternate_format.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/asyoutypeformatter.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/base/strings/string_piece.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/default_logger.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/logger.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonemetadata.pb.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonenumber.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonenumber.pb.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonenumbermatch.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonenumbermatcher.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/phonenumberutil.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/regex_based_matcher.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/regexp_adapter_icu.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/regexp_cache.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/short_metadata.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/shortnumberinfo.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/string_byte_sink.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/stringutil.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/test_metadata.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/unicodestring.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/utf/rune.c", "//third_party/libphonenumber/cpp/src/phonenumbers/utf/unicodetext.cc", "//third_party/libphonenumber/cpp/src/phonenumbers/utf/unilib.cc", "phonenumbers/phonenumberutil_test.cc", "phonenumbers/test_util.cc", ] configs = [ ":phonenumber_test_config" ] defines = [ "I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS", "I18N_PHONENUMBERS_USE_ICU_REGEXP", "HAVE_PTHREAD", ] deps = [ "//third_party/icu/icu4c:shared_icui18n", "//third_party/icu/icu4c:shared_icuuc", "//third_party/protobuf:protobuf_lite", ] }