1bafb9395Sopenharmony_ci# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
2bafb9395Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3bafb9395Sopenharmony_ci# you may not use this file except in compliance with the License.
4bafb9395Sopenharmony_ci# You may obtain a copy of the License at
5bafb9395Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
6bafb9395Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
7bafb9395Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
8bafb9395Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9bafb9395Sopenharmony_ci# See the License for the specific language governing permissions and
10bafb9395Sopenharmony_ci# limitations under the License.
11bafb9395Sopenharmony_ci
12bafb9395Sopenharmony_ciif (ohos_kernel_type != "liteos_m") {
13bafb9395Sopenharmony_ci  import("//build/lite/config/test.gni")
14bafb9395Sopenharmony_ci
15bafb9395Sopenharmony_ci  group("graphic_utils_lite_test") {
16bafb9395Sopenharmony_ci    if (ohos_build_type == "debug") {
17bafb9395Sopenharmony_ci      deps = [ ":graphic_test_utils_door" ]
18bafb9395Sopenharmony_ci    }
19bafb9395Sopenharmony_ci  }
20bafb9395Sopenharmony_ci
21bafb9395Sopenharmony_ci  config("graphic_utils_lite_test_config") {
22bafb9395Sopenharmony_ci    include_dirs = []
23bafb9395Sopenharmony_ci    ldflags = [
24bafb9395Sopenharmony_ci      "-lstdc++",
25bafb9395Sopenharmony_ci      "-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
26bafb9395Sopenharmony_ci    ]
27bafb9395Sopenharmony_ci  }
28bafb9395Sopenharmony_ci
29bafb9395Sopenharmony_ci  if (ohos_build_type == "debug") {
30bafb9395Sopenharmony_ci    unittest("graphic_test_utils_door") {
31bafb9395Sopenharmony_ci      output_extension = "bin"
32bafb9395Sopenharmony_ci      output_dir = "$root_out_dir/test/unittest/graphic"
33bafb9395Sopenharmony_ci      deps = [ "//foundation/graphic/graphic_utils_lite:utils_lite" ]
34bafb9395Sopenharmony_ci      configs = [ ":graphic_utils_lite_test_config" ]
35bafb9395Sopenharmony_ci      sources = [
36bafb9395Sopenharmony_ci        "color_unit_test.cpp",
37bafb9395Sopenharmony_ci        "geometry2d_unit_test.cpp",
38bafb9395Sopenharmony_ci        "graphic_math_unit_test.cpp",
39bafb9395Sopenharmony_ci        "list_unit_test.cpp",
40bafb9395Sopenharmony_ci        "rect_unit_test.cpp",
41bafb9395Sopenharmony_ci        "style_unit_test.cpp",
42bafb9395Sopenharmony_ci        "vector_unit_test.cpp",
43bafb9395Sopenharmony_ci      ]
44bafb9395Sopenharmony_ci    }
45bafb9395Sopenharmony_ci  }
46bafb9395Sopenharmony_ci} else {
47bafb9395Sopenharmony_ci  group("graphic_utils_lite_test") {
48bafb9395Sopenharmony_ci  }
49bafb9395Sopenharmony_ci}
50