blob: fa03b2f348bdee77d4b0a7a53a6ed98d295eb61c [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/fidl/fidl.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
import("//src/tests/fidl/conformance_suite/gidl-conformance-suite.gni")
import("//tools/fidl/gidl/gidl.gni")
gidl_llcpp("generated_conformance_test") {
testonly = true
type = "conformance"
inputs = conformance_suite_gidl_files
fidl = conformance_suite_fidl_target
deps = [ "//third_party/googletest:gtest" ]
}
executable("fidl_llcpp_conformance_test_bin") {
testonly = true
output_name = "fidl_llcpp_conformance_test"
sources = [
"manual_conformance_test.cc",
"test_utils.cc",
]
deps = [
":generated_conformance_test",
"//sdk/lib/fidl/cpp:fidl_test_llcpp",
"//src/lib/fxl/test:gtest_main",
"//src/tests/fidl/conformance_suite:conformance_fidl_llcpp",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/fbl",
]
}
unittest_package("fidl_llcpp_conformance_test") {
deps = [ ":fidl_llcpp_conformance_test_bin" ]
tests = [
{
name = "fidl_llcpp_conformance_test"
environments = basic_envs
},
]
}
fidl("fidl.llcpp.types.test") {
sources = [ "types.test.fidl" ]
}
fidl("llcpptest.flexible.test") {
sources = [ "flexible.test.fidl" ]
}
fidl("llcpptest.protocol.test") {
sources = [ "protocol.test.fidl" ]
}
fidl("llcpptest.transitional.test") {
sources = [ "transitional.test.fidl" ]
}
executable("fidl_llcpp_types_test_bin") {
testonly = true
output_name = "fidl_llcpp_types_test"
sources = [
"bits_test.cc",
"flexible_test.cc",
"protocol_test.cc",
"table_test.cc",
"test_utils.cc",
"transformer_integration_test.cc",
"transitional_test.cc",
"xunion_test.cc",
]
deps = [
":fidl.llcpp.types.test_llcpp",
":llcpptest.flexible.test_llcpp",
":llcpptest.protocol.test_llcpp",
":llcpptest.transitional.test_llcpp",
"//sdk/lib/fidl/cpp:transformerintegration.test_llcpp",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl-async-cpp",
]
}
package("fidl_llcpp_types_test") {
testonly = true
deps = [ ":fidl_llcpp_types_test_bin" ]
meta = [
{
path = "fidl_llcpp_types_test.cmx"
dest = "fidl_llcpp_types_test.cmx"
},
]
tests = [
{
name = "fidl_llcpp_types_test"
environments = basic_envs
},
]
}
executable("fidl_llcpp_builder_test_bin") {
testonly = true
output_name = "fidl_llcpp_builder_test"
sources = [
"aligned_test.cc",
"buffer_allocator_test.cc",
"failover_allocator_test.cc",
"memory_test.cc",
"tracking_ptr_test.cc",
"unowned_ptr_test.cc",
"vector_view_test.cc",
]
deps = [
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
]
}
package("fidl_llcpp_builder_test") {
testonly = true
deps = [ ":fidl_llcpp_builder_test_bin" ]
meta = [
{
path = "fidl_llcpp_builder_test.cmx"
dest = "fidl_llcpp_builder_test.cmx"
},
]
tests = [
{
name = "fidl_llcpp_builder_test"
environments = basic_envs
},
]
}