1# Copyright (C) 2022 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("//test/xts/tools/build/suite.gni")
15
16module_output_path = "hit/ActsGraphicNapiDrawingTest"
17
18###############################################################################
19
20ohos_moduletest_suite("ActsGraphicNapiDrawingTest") {
21  module_out_path = module_output_path
22  subsystem_name = "graphic"
23  part_name = "graphic_2d"
24  comPath = "../../../../../foundation/graphic/graphic_2d"
25
26  sources = [
27    "NativeDrawingBitmapLargeValueTest.cpp",
28    "NativeDrawingBitmapTest.cpp",
29    "NativeDrawingBrushTest.cpp",
30    "NativeDrawingCanvasLargeValueTest.cpp",
31    "NativeDrawingCanvasTest.cpp",
32    "NativeDrawingColorSpaceTest.cpp",
33    "NativeDrawingColorTest.cpp",
34    "NativeDrawingFontMgrTest.cpp",
35    "NativeDrawingGpuContextTest.cpp",
36    "NativeDrawingMatrixTest.cpp",
37    "NativeDrawingPathEffectTest.cpp",
38    "NativeDrawingPathLargeValueTest.cpp",
39    "NativeDrawingPathTest.cpp",
40    "NativeDrawingPenTest.cpp",
41    "NativeDrawingPointTest.cpp",
42    "NativeDrawingRectLargeValueTest.cpp",
43    "NativeDrawingRectTest.cpp",
44    "NativeDrawingRegionLargeValueTest.cpp",
45    "NativeDrawingRegionTest.cpp",
46    "NativeDrawingRoundRectLargeValueTest.cpp",
47    "NativeDrawingRoundRectTest.cpp",
48    "NativeDrawingSurfaceLargeValueTest.cpp",
49    "NativeDrawingSurfaceTest.cpp",
50    "NativeFontTest.cpp",
51    "NativeImageLargeValueTest.cpp",
52    "NativeImageTest.cpp",
53    "OH_Drawing_FontCollectionTest.cpp",
54    "OH_Drawing_TypographyLargeValueTest.cpp",
55    "OH_Drawing_TypographyTest.cpp",
56    "drawing_register_font_test.cpp",
57  ]
58
59  cflags = [
60    "-Wall",
61    "-Werror",
62  ]
63
64  include_dirs = [
65    "$comPath/rosen/modules/2d_engine",
66    "//third_party/googletest/googletest/include",
67  ]
68  enable_text_gine = true
69  if (enable_text_gine) {
70    include_dirs += [ "$comPath/rosen/modules/2d_engine/rosen_text/export" ]
71    defines = [ "USE_GRAPHIC_TEXT_GINE" ]
72  }
73
74  external_deps = [
75    "c_utils:utils",
76    "graphic_2d:2d_graphics",
77    "graphic_2d:EGL",
78    "graphic_2d:GLESv3",
79    "graphic_2d:native_drawing_ndk",
80    "hilog:libhilog",
81    "openssl:libcrypto_shared",
82  ]
83  deps = [ "//third_party/googletest:gtest_main" ]
84}
85