blob: 04a759825a91e54c0f6a647c72a855f5678195f6 [file]
# Copyright 2021 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/test.gni")
group("wire_types") {
testonly = true
deps = [
":fidl_llcpp_builder_tests",
":fidl_llcpp_builder_tests_bin($host_toolchain)",
":fidl_llcpp_wire_type_api_tests",
":fidl_llcpp_wire_type_api_tests_bin($host_toolchain)",
]
}
test("fidl_llcpp_wire_type_api_tests_bin") {
output_name = "fidl_llcpp_wire_type_api_tests"
sources = [
"bits_test.cc",
"enum_test.cc",
]
deps = [
"//sdk/testing/fidl/types_tests:test.types_cpp_wire",
"//src/lib/fidl/llcpp/tests:arena_checker",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
if (is_fuchsia) {
sources += [
# These tests use the wire messaging layer.
"anonymous_test.cc",
"llcpp_types_tests.cc",
"traits_test.cc",
# These tests use handles.
"table_test.cc",
"xunion_test.cc",
]
deps += [ "//src/lib/fidl/llcpp/tests:types_test_utils" ]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
}
fuchsia_unittest_package("fidl_llcpp_wire_type_api_tests") {
# Use `fuchsia.process.Launcher` for death tests
manifest = "meta/wire_type_api_tests.cml"
deps = [ ":fidl_llcpp_wire_type_api_tests_bin" ]
}
test("fidl_llcpp_builder_tests_bin") {
output_name = "fidl_llcpp_builder_tests"
sources = [ "vector_view_test.cc" ]
deps = [
"//sdk/lib/fidl",
"//sdk/lib/fidl/cpp/wire",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
if (is_fuchsia) {
sources += [
# These tests use Zircon handles.
"arena_test.cc",
# These tests use fbl.
"memory_test.cc",
]
deps += [
"//src/lib/fidl/llcpp/tests:types_test_utils",
"//zircon/system/ulib/fbl",
]
}
}
fuchsia_unittest_package("fidl_llcpp_builder_tests") {
deps = [ ":fidl_llcpp_builder_tests_bin" ]
deprecated_legacy_test_execution = true
}