| # Copyright 2018 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| source_set("callback") { |
| sources = [ |
| "auto_cleanable.h", |
| "capture.h", |
| "destruction_sentinel.cc", |
| "destruction_sentinel.h", |
| "scoped_callback.h", |
| "scoped_task_runner.cc", |
| "scoped_task_runner.h", |
| "trace_callback.h", |
| ] |
| |
| public_deps = [ |
| "//src/lib/fxl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/trace", |
| ] |
| |
| public_configs = [ "//garnet/public:config" ] |
| |
| deps = [ "//zircon/public/lib/async-cpp" ] |
| } |
| |
| executable("callback_unittests") { |
| testonly = true |
| |
| sources = [ |
| "auto_cleanable_unittest.cc", |
| "capture_unittest.cc", |
| "destruction_sentinel_unittest.cc", |
| "scoped_callback_unittest.cc", |
| "scoped_task_runner_unittest.cc", |
| ] |
| |
| deps = [ |
| ":callback", |
| "//garnet/public/lib/gtest", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/async-testing", |
| ] |
| } |
| |
| unittest_package("callback_tests") { |
| deps = [ ":callback_unittests" ] |
| |
| tests = [ |
| { |
| name = "callback_unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":callback_tests" ] |
| } |