blob: 661a202e4f3704eeb147b0aa16fe6a4f1f9b9cd0 [file] [log] [blame]
# 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("//src/lib/icu/third_party_icu_headers.gni")
group("tests") {
testonly = true
deps = [ ":intl_property_provider_impl_tests" ]
}
third_party_icu_headers("icu_headers") {
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",
]
}
source_set("intl_property_provider_impl") {
sources = [
"intl_property_provider_impl.cc",
"intl_property_provider_impl.h",
]
deps = [
":icu_headers",
":locale_util",
"//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp",
"//sdk/fidl/fuchsia.settings:fuchsia.settings_hlcpp",
"//sdk/lib/fidl/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",
"//src/lib/icu_data/cpp",
]
public_deps = [
":fidl_hlcpp",
"//sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp",
"//sdk/fidl/fuchsia.settings:fuchsia.settings_hlcpp",
"//sdk/lib/fit-promise",
]
}
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/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/modular/lib/fidl:clone",
"//src/performance/trace/tests:component_context",
]
}
source_set("locale_util") {
visibility = [ ":*" ]
sources = [
"locale_util.cc",
"locale_util.h",
]
deps = [
":icu_headers",
"//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",
"//src/lib/icu:lib",
]
}
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" ]
}