| # Copyright 2017 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. |
| |
| group("tests") { |
| testonly = true |
| |
| public_deps = [ |
| ":input_apptests", |
| ":input_reader_unittests", |
| ] |
| } |
| |
| executable("input_apptests") { |
| output_name = "input_apptests" |
| |
| testonly = true |
| |
| deps = [ |
| ":end_to_end_tests", |
| ":interface_tests", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| source_set("end_to_end_tests") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| sources = [ |
| "end_to_end_tests.cc", |
| ] |
| |
| deps = [ |
| ":mock_device_watcher", |
| ":mock_hid_decoder", |
| "//garnet/bin/ui/input_reader", |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/ui/tests/mocks", |
| "//sdk/fidl/fuchsia.ui.input", |
| "//zircon/public/lib/hid", |
| "//zircon/public/lib/hid-parser", |
| ] |
| } |
| |
| source_set("interface_tests") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| sources = [ |
| "interface_tests.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/ui/tests/mocks", |
| "//sdk/fidl/fuchsia.ui.input", |
| "//zircon/public/lib/hid", |
| "//zircon/public/lib/hid-parser", |
| ] |
| } |
| |
| source_set("mock_device_watcher") { |
| sources = [ |
| "mock_device_watcher.cc", |
| "mock_device_watcher.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/bin/ui/input_reader:device", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/fxl", |
| "//zircon/public/lib/hid-parser", |
| ] |
| } |
| |
| source_set("mock_hid_decoder") { |
| sources = [ |
| "mock_hid_decoder.cc", |
| "mock_hid_decoder.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/bin/ui/input_reader:device", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/fxl", |
| "//zircon/public/lib/hid-parser", |
| ] |
| } |
| |
| executable("input_reader_unittests") { |
| output_name = "input_reader_unittests" |
| |
| testonly = true |
| |
| sources = [ |
| "mouse_test.cc", |
| "sensor_test.cc", |
| "touchpad_test.cc", |
| "touchscreen_test.cc", |
| ] |
| |
| deps = [ |
| "//garnet/bin/ui/input_reader", |
| "//garnet/public/lib/gtest", |
| "//third_party/googletest:gtest_main", |
| "//zircon/public/lib/hid", |
| "//zircon/public/lib/hid-parser", |
| ] |
| } |