• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/graphic/graphic_2d/frameworks/text/config.gni")
16import("//foundation/graphic/graphic_2d/graphic_config.gni")
17
18group("unittest") {
19  testonly = true
20  deps = [
21    ":texgine_unittest_part3",
22    ":texgine_unittest_part7",
23  ]
24}
25
26config("texgine_test_config") {
27  include_dirs = [
28    "$rosen_text_root/service/texgine/src",
29    "$rosen_text_root/service/texgine/src/opentype_parser",
30  ]
31
32  cflags = [
33    "-Dprivate=public",
34    "-Dprotected=public",
35  ]
36
37  defines = [ "ENABLE_OHOS_ENHANCE" ]
38}
39
40group("common_deps") {
41  testonly = true
42  public_deps = [
43    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
44    "$graphic_2d_root/utils/test_header:test_header",
45    "$rosen_text_root:rosen_text",
46  ]
47}
48
49ohos_unittest("texgine_unittest_part3") {
50  module_out_path = text_ut_out_path
51  sources = [ "font_parser_test.cpp" ]
52
53  public_configs = [ ":texgine_test_config" ]
54  public_deps = [ ":common_deps" ]
55
56  use_exceptions = true
57
58  part_name = "graphic_2d"
59  subsystem_name = "graphic"
60}
61
62ohos_unittest("texgine_unittest_part7") {
63  module_out_path = text_ut_out_path
64
65  sources = [ "font_descriptor_cache_test.cpp" ]
66
67  public_configs = [ ":texgine_test_config" ]
68  public_deps = [ ":common_deps" ]
69
70  use_exceptions = true
71
72  part_name = "graphic_2d"
73  subsystem_name = "graphic"
74}
75