| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/components.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/icu/icu_source_set.gni") |
| import("//build/icu/third_party_icu_headers.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":intl_property_provider_impl_tests" ] |
| } |
| |
| third_party_icu_headers("icu_headers") { |
| icu_assembly = true |
| headers = [ |
| "third_party/icu/source/common/unicode/errorcode.h", |
| "third_party/icu/source/common/unicode/localebuilder.h", |
| "third_party/icu/source/common/unicode/locid.h", |
| "third_party/icu/source/common/unicode/unistr.h", |
| "third_party/icu/source/i18n/unicode/calendar.h", |
| "third_party/icu/source/i18n/unicode/dtptngen.h", |
| "third_party/icu/source/i18n/unicode/numsys.h", |
| "third_party/icu/source/i18n/unicode/timezone.h", |
| "third_party/icu/source/i18n/unicode/ucal.h", |
| "third_party/icu/source/i18n/unicode/ulocdata.h", |
| ] |
| } |
| |
| fidl("fidl") { |
| name = "fuchsia.intl.merge" |
| visibility = [ ":*" ] |
| sources = [ "merge.fidl" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.intl", |
| "//sdk/fidl/fuchsia.settings", |
| ] |
| enable_hlcpp = true |
| } |
| |
| icu_source_set("intl_property_provider_impl") { |
| sources = [ |
| "intl_property_provider_impl.cc", |
| "intl_property_provider_impl.h", |
| ] |
| |
| icu_deps = [ |
| ":icu_headers", |
| ":locale_util", |
| "//src/lib/icu_data/cpp", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_cpp", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings_cpp", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/inspect/component/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/service/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fostr/fidl/fuchsia.intl", |
| "//src/lib/fostr/fidl/fuchsia.settings", |
| "//src/lib/fxl", |
| ] |
| |
| public_deps = [ |
| ":fidl_hlcpp", |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings_hlcpp", |
| "//sdk/lib/fit-promise", |
| "//sdk/lib/inspect/component/cpp", |
| ] |
| } |
| |
| executable("intl_property_provider_impl_test_bin") { |
| testonly = true |
| output_name = "intl_property_provider_impl_test" |
| |
| sources = [ "intl_property_provider_impl_test.cc" ] |
| |
| deps = [ |
| ":intl_property_provider_impl", |
| "//sdk/lib/inspect/testing/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fidl_fuchsia_intl_ext/cpp", |
| "//src/lib/fostr/fidl/fuchsia.intl", |
| "//src/lib/fostr/fidl/fuchsia.settings", |
| "//src/lib/fxl/test:test_settings", |
| "//src/lib/testing/loop_fixture", |
| "//src/performance/trace/tests:component_context", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| icu_source_set("locale_util") { |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "locale_util.cc", |
| "locale_util.h", |
| ] |
| |
| icu_deps = [ ":icu_headers" ] |
| |
| deps = [ |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fostr/fidl/fuchsia.intl", |
| "//src/lib/fxl", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp", |
| "//sdk/lib/fit-promise", |
| ] |
| } |
| |
| executable("locale_util_unit_test_bin") { |
| testonly = true |
| output_name = "locale_util_unit_test" |
| |
| sources = [ "locale_util_unit_test.cc" ] |
| |
| deps = [ |
| ":icu_headers", |
| ":locale_util", |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp", |
| "//src/lib/fidl_fuchsia_intl_ext/cpp", |
| "//src/lib/fostr/fidl/fuchsia.intl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/icu_data/cpp", |
| ] |
| } |
| |
| fuchsia_unittest_component("intl_property_provider_impl_test") { |
| deps = [ ":intl_property_provider_impl_test_bin" ] |
| } |
| |
| fuchsia_unittest_component("locale_util_unit_test") { |
| deps = [ ":locale_util_unit_test_bin" ] |
| } |
| |
| fuchsia_test_package("intl_property_provider_impl_tests") { |
| test_components = [ |
| ":intl_property_provider_impl_test", |
| ":locale_util_unit_test", |
| ] |
| deps = [ "//src/intl:icudtl" ] |
| } |