• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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/config/features.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17import("//foundation/graphic/graphic_3d/lume/lume_config.gni")
18
19module_output_path = "graphic_3d/lume/LumeBase"
20
21ohos_unittest("lume_base_test") {
22  module_out_path = module_output_path
23
24  include_dirs = [
25    "${LUME_BASE_PATH}/api",
26    "${LUME_CORE_PATH}/api",
27    "${LUME_RENDER_PATH}/api",
28    "${LUME_CORE3D_PATH}/api",
29    "${LUME_CORE3D_PATH}/src",
30    "${LUME_CORE_PATH}/src",
31    "${LUME_METAOBJECT_PATH}/include",
32    "${LUME_SCP_PATH}/plugin/include",
33    "${LUME_CORE_PATH}/api/platform/ohos",
34    "${LUME_CORE_PATH}/ecshelper",
35    "${LUME_ROOT}/../3d_widget_adapter/core/include",
36  ]
37
38  configs = [
39    "${LUME_ROOT}/../3d_widget_adapter:widget_adapter_config",
40    "${LUME_ROOT}/../3d_scene_adapter:scene_adapter_config",
41  ]
42
43  cflags = [
44    "-g",
45    "-O0",
46    "-Wno-unused-variable",
47    "-fno-omit-frame-pointer",
48    "-Dprivate=public",
49    "-Dprotected=public",
50  ]
51
52  cflags_cc = [
53    "-g",
54    "-O0",
55    "-Wno-unused-variable",
56    "-fno-omit-frame-pointer",
57    "-Dprivate=public",
58    "-Dprotected=public",
59  ]
60  sources = [
61    "src/containers/array_view_test.cpp",
62    "src/containers/byte_array_test.cpp",
63    "src/containers/iterator_test.cpp",
64    "src/containers/ptr_test.cpp",
65    "src/containers/string_test.cpp",
66    "src/containers/string_view_test.cpp",
67    "src/containers/unordered_map_test.cpp",
68    "src/util/base64_test.cpp",
69  ]
70
71  external_deps = [
72    "c_utils:utils",
73    "googletest:gmock",
74    "googletest:gtest",
75  ]
76
77  part_name = "graphic_3d"
78  subsystem_name = "graphic"
79}
80
81group("unittest") {
82  testonly = true
83  deps = []
84  deps += [ ":lume_base_test" ]
85}
86