1# Copyright (c) 2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("//foundation/multimedia/av_codec/config.gni") 16 17module_output_path = "av_codec/AVCodec_Video/unittest" 18 19audio_sampleformat_unittest_cflags = [ 20 "-std=c++17", 21 "-fno-rtti", 22 "-fexceptions", 23 "-Wall", 24 "-fno-common", 25 "-fstack-protector-strong", 26 "-Wshadow", 27 "-FPIC", 28 "-FS", 29 "-O2", 30 "-D_FORTIFY_SOURCE=2", 31 "-fvisibility=hidden", 32 "-Wformat=2", 33 "-Wdate-time", 34 "-Wextra", 35 "-Wimplicit-fallthrough", 36 "-Wsign-compare", 37 "-Dprivate=public", 38 "-Dprotected=public", 39] 40 41ohos_unittest("audio_sampleformat_unittest") { 42 module_out_path = module_output_path 43 44 sanitize = { 45 cfi = true 46 cfi_cross_dso = true 47 debug = false 48 } 49 50 sources = [ 51 "./audio_sampleformat_unitttest.cpp", 52 "$av_codec_root_dir/services/media_engine/modules/sink/audio_sampleformat.cpp", 53 ] 54 55 include_dirs = [ 56 "./", 57 "$av_codec_root_dir/services/media_engine/modules/sink", 58 ] 59 60 cflags = audio_sampleformat_unittest_cflags 61 62 deps = [ 63 ] 64 65 external_deps = [ 66 "c_utils:utils", 67 "googletest:gtest", 68 "googletest:gmock", 69 "hilog:libhilog", 70 "media_foundation:media_foundation", 71 ] 72 73}