1049e185fSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
2049e185fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3049e185fSopenharmony_ci# you may not use this file except in compliance with the License.
4049e185fSopenharmony_ci# You may obtain a copy of the License at
5049e185fSopenharmony_ci#
6049e185fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7049e185fSopenharmony_ci#
8049e185fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9049e185fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10049e185fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11049e185fSopenharmony_ci# See the License for the specific language governing permissions and
12049e185fSopenharmony_ci# limitations under the License.
13049e185fSopenharmony_ci
14049e185fSopenharmony_ciimport("//build/test.gni")
15049e185fSopenharmony_ciimport("//foundation/multimedia/player_framework/config.gni")
16049e185fSopenharmony_ciimport("./../../../multimedia_player_framework_aafwk.gni")
17049e185fSopenharmony_ci
18049e185fSopenharmony_cimodule_output_path = "player_framework/soundpool"
19049e185fSopenharmony_ci
20049e185fSopenharmony_ciohos_unittest("soundpool_unit_test") {
21049e185fSopenharmony_ci  module_out_path = module_output_path
22049e185fSopenharmony_ci  include_dirs = [
23049e185fSopenharmony_ci    "./include",
24049e185fSopenharmony_ci    "${multimedia_player_framework_path}/frameworks/native/soundpool",
25049e185fSopenharmony_ci    "${multimedia_player_framework_path}/test/unittest/common/include",
26049e185fSopenharmony_ci    "${multimedia_player_framework_path}/interfaces/inner_api/native/soundpool/include",
27049e185fSopenharmony_ci  ]
28049e185fSopenharmony_ci
29049e185fSopenharmony_ci  cflags = [
30049e185fSopenharmony_ci    "-Wall",
31049e185fSopenharmony_ci    "-Werror",
32049e185fSopenharmony_ci  ]
33049e185fSopenharmony_ci
34049e185fSopenharmony_ci  if (player_framework_support_jssoundpool) {
35049e185fSopenharmony_ci    sources = [
36049e185fSopenharmony_ci      "src/soundpool_mock.cpp",
37049e185fSopenharmony_ci      "src/soundpool_unit_test.cpp",
38049e185fSopenharmony_ci    ]
39049e185fSopenharmony_ci  }
40049e185fSopenharmony_ci
41049e185fSopenharmony_ci  deps = [
42049e185fSopenharmony_ci    "${multimedia_player_framework_path}/frameworks/native/soundpool:soundpool_client",
43049e185fSopenharmony_ci    "${multimedia_player_framework_path}/interfaces/inner_api/native:media_client",
44049e185fSopenharmony_ci  ]
45049e185fSopenharmony_ci
46049e185fSopenharmony_ci  external_deps = [
47049e185fSopenharmony_ci    "audio_framework:audio_client",
48049e185fSopenharmony_ci    "audio_framework:audio_renderer",
49049e185fSopenharmony_ci    "hilog:libhilog",
50049e185fSopenharmony_ci  ]
51049e185fSopenharmony_ci
52049e185fSopenharmony_ci  resource_config_file = "${multimedia_player_framework_path}/test/unittest/resources/ohos_test.xml"
53049e185fSopenharmony_ci}
54