• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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/graphic/graphic_2d/graphic_config.gni")
16module_output_path = "graphic_2d/graphic_2d/rosen/modules/2d_graphics/utils"
17
18ohos_unittest("2d_graphics_utils_test") {
19  module_out_path = module_output_path
20
21  sources = [
22    "camera3d_test.cpp",
23    "canvas_utils_test.cpp",
24    "colorspace_convertor_test.cpp",
25    "data_test.cpp",
26    "matrix44_test.cpp",
27    "matrix_test.cpp",
28    "object_helper_test.cpp",
29    "performanceCaculate_test.cpp",
30    "point3_test.cpp",
31    "point_test.cpp",
32    "rect_test.cpp",
33    "region_test.cpp",
34    "round_rect_test.cpp",
35    "sampling_options_test.cpp",
36    "size_test.cpp",
37    "utils_path_test.cpp",
38    "vertices_test.cpp",
39  ]
40
41  include_dirs = [
42    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
43    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src",
44  ]
45
46  deps = [
47    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
48    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
49    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
50    "$graphic_2d_root/utils/color_manager",
51  ]
52
53
54  cflags = [
55    "-Dprivate=public",
56    "-Dprotected=public",
57  ]
58
59  defines = [ "ROSEN_OHOS" ]
60
61  subsystem_name = "graphic"
62  external_deps = [
63    "c_utils:utils",
64    "eventhandler:libeventhandler",
65    "hilog:libhilog",
66  ]
67}
68
69group("unittest") {
70  testonly = true
71
72  deps = [ ":2d_graphics_utils_test" ]
73}
74