| # Copyright 2020 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") |
| |
| source_set("format") { |
| sources = [ |
| "audio_buffer.h", |
| "driver_format.cc", |
| "driver_format.h", |
| "format.cc", |
| "format.h", |
| "traits.h", |
| ] |
| |
| public_deps = [ |
| ":constants", |
| "//sdk/fidl/fuchsia.hardware.audio", |
| "//sdk/fidl/fuchsia.media", |
| "//sdk/lib/stdcompat", |
| "//sdk/lib/syslog/cpp", |
| "//src/media/audio/lib/format2", |
| "//src/media/audio/lib/timeline", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/trace", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| "//src/media/audio/drivers/lib/audio-proto-utils", |
| ] |
| } |
| |
| source_set("constants") { |
| sources = [ "constants.h" ] |
| public_deps = [ |
| "//src/media/audio/lib/format2:fixed", |
| "//zircon/system/ulib/ffl", |
| ] |
| } |
| |
| executable("unittest-bin") { |
| visibility = [ ":*" ] |
| testonly = true |
| output_name = "audio-libformat-unittests" |
| |
| sources = [ |
| "audio_buffer_unittest.cc", |
| "format_unittest.cc", |
| "traits_unittest.cc", |
| ] |
| |
| deps = [ |
| ":format", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/zircon/lib/zircon", |
| "//third_party/googletest:gmock", |
| ] |
| } |
| |
| fuchsia_unittest_package("audio-libformat-unittests") { |
| deps = [ ":unittest-bin" ] |
| |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":audio-libformat-unittests" ] |
| } |