13e5483f6Sopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd.
23e5483f6Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
33e5483f6Sopenharmony_ci# you may not use this file except in compliance with the License.
43e5483f6Sopenharmony_ci# You may obtain a copy of the License at
53e5483f6Sopenharmony_ci#
63e5483f6Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
73e5483f6Sopenharmony_ci#
83e5483f6Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
93e5483f6Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
103e5483f6Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113e5483f6Sopenharmony_ci# See the License for the specific language governing permissions and
123e5483f6Sopenharmony_ci# limitations under the License.
133e5483f6Sopenharmony_ci
143e5483f6Sopenharmony_ciimport("//build/test.gni")
153e5483f6Sopenharmony_ciimport("//foundation/multimedia/ringtone_library/ringtone_library.gni")
163e5483f6Sopenharmony_ci
173e5483f6Sopenharmony_cigroup("unittest") {
183e5483f6Sopenharmony_ci  testonly = true
193e5483f6Sopenharmony_ci
203e5483f6Sopenharmony_ci  deps = [ ":ringtone_helper_unittest" ]
213e5483f6Sopenharmony_ci}
223e5483f6Sopenharmony_ci
233e5483f6Sopenharmony_ciohos_unittest("ringtone_helper_unittest") {
243e5483f6Sopenharmony_ci  module_out_path = "ringtone_library/ringtonelibraryextention"
253e5483f6Sopenharmony_ci
263e5483f6Sopenharmony_ci  include_dirs = [
273e5483f6Sopenharmony_ci    "./include",
283e5483f6Sopenharmony_ci    "../ringtone_unittest_utils/include",
293e5483f6Sopenharmony_ci    "${RINGTONE_EXTENSION_PATH}/include",
303e5483f6Sopenharmony_ci    "${RINGTONE_INTERFACES_PATH}/inner_api/native",
313e5483f6Sopenharmony_ci    "${RINGTONE_UTILS_PATH}/include",
323e5483f6Sopenharmony_ci  ]
333e5483f6Sopenharmony_ci
343e5483f6Sopenharmony_ci  sources = [
353e5483f6Sopenharmony_ci    "./src/ringtone_asset_test.cpp",
363e5483f6Sopenharmony_ci    "./src/ringtone_fetch_result_test.cpp",
373e5483f6Sopenharmony_ci    "./src/simcard_setting_asset_test.cpp",
383e5483f6Sopenharmony_ci    "./src/vibrate_asset_test.cpp",
393e5483f6Sopenharmony_ci  ]
403e5483f6Sopenharmony_ci
413e5483f6Sopenharmony_ci  deps = [
423e5483f6Sopenharmony_ci    "${RINGTONE_ROOT_PATH}/services:ringtone_data_extension",
433e5483f6Sopenharmony_ci    "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper",
443e5483f6Sopenharmony_ci  ]
453e5483f6Sopenharmony_ci
463e5483f6Sopenharmony_ci  external_deps = [
473e5483f6Sopenharmony_ci    "ability_base:zuri",
483e5483f6Sopenharmony_ci    "ability_runtime:ability_context_native",
493e5483f6Sopenharmony_ci    "ability_runtime:ability_manager",
503e5483f6Sopenharmony_ci    "ability_runtime:app_context",
513e5483f6Sopenharmony_ci    "ability_runtime:extensionkit_native",
523e5483f6Sopenharmony_ci    "c_utils:utils",
533e5483f6Sopenharmony_ci    "data_share:datashare_common",
543e5483f6Sopenharmony_ci    "data_share:datashare_provider",
553e5483f6Sopenharmony_ci    "ipc:ipc_single",
563e5483f6Sopenharmony_ci    "napi:ace_napi",
573e5483f6Sopenharmony_ci    "player_framework:media_client",
583e5483f6Sopenharmony_ci    "relational_store:rdb_data_share_adapter",
593e5483f6Sopenharmony_ci  ]
603e5483f6Sopenharmony_ci
613e5483f6Sopenharmony_ci  sanitize = {
623e5483f6Sopenharmony_ci    cfi = true
633e5483f6Sopenharmony_ci    cfi_cross_dso = true
643e5483f6Sopenharmony_ci    debug = false
653e5483f6Sopenharmony_ci  }
663e5483f6Sopenharmony_ci
673e5483f6Sopenharmony_ci  if (is_standard_system) {
683e5483f6Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
693e5483f6Sopenharmony_ci  } else {
703e5483f6Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
713e5483f6Sopenharmony_ci  }
723e5483f6Sopenharmony_ci}
73