1# Copyright (c) 2023 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/unittest"
18
19av_codec_unittest_cflags = [
20  "-std=c++17",
21  "-fno-rtti",
22  "-Wall",
23  "-fno-common",
24  "-fstack-protector-strong",
25  "-Wshadow",
26  "-FPIC",
27  "-FS",
28  "-O2",
29  "-D_FORTIFY_SOURCE=2",
30  "-fvisibility=hidden",
31  "-Wformat=2",
32  "-Wdate-time",
33  "-Werror",
34  "-Wextra",
35  "-Wimplicit-fallthrough",
36  "-Wsign-compare",
37  "-Wno-unused-function",
38  "-Wno-unused-parameter",
39  "-Dprivate=public",
40  "-Dprotected=public",
41]
42
43##################################################################################################################
44ohos_unittest("avcenc_info_capi_unit_test") {
45  sanitize = av_codec_test_sanitize
46
47  module_out_path = module_output_path
48  include_dirs = [
49    "./",
50    "$av_codec_root_dir/test/unittest/common",
51  ]
52
53  defines = av_codec_defines
54
55  sources = [ "./cenc_info_capi_unit_test.cpp" ]
56
57  cflags = av_codec_unittest_cflags
58
59  cflags_cc = cflags
60
61  deps = [
62    "$av_codec_root_dir/interfaces/kits/c:native_media_avcencinfo",
63    "$av_codec_root_dir/services/dfx:av_codec_service_dfx",
64    "//third_party/googletest:gmock_main",
65  ]
66
67  external_deps = [
68    "c_utils:utils",
69    "hilog:libhilog",
70    "media_foundation:media_foundation",
71  ]
72
73  resource_config_file =
74      "$av_codec_root_dir/test/unittest/resources/ohos_test.xml"
75}
76