# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/multimedia/player_framework/config.gni") module_output_path = "player_framework/player" ohos_unittest("player_unit_test") { module_out_path = module_output_path include_dirs = [ "./include", "//foundation/multimedia/player_framework/interfaces/inner_api/native", "//foundation/multimedia/player_framework/frameworks/native/player", "//foundation/window/window_manager/interfaces/innerkits/wm", "//foundation/multimedia/player_framework/test/unittest/common/include", "src/data_source", ] cflags = [ "-Wall", "-Werror", "-Wno-deprecated-declarations", ] if (player_framework_support_player) { sources = [ "src/data_source/media_data_source_test_noseek.cpp", "src/data_source/media_data_source_test_seekable.cpp", "src/player_mock.cpp", "src/player_unit_test.cpp", ] } deps = [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", "//foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", "//foundation/window/window_manager/wm:libwm", ] external_deps = [ "audio_framework:audio_client", "c_utils:utils", "graphic_surface:surface", "hilog:libhilog", "media_foundation:media_foundation", ] resource_config_file = "//foundation/multimedia/player_framework/test/unittest/resources/ohos_test.xml" }