# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") module_output_path = "graphic_2d/rosen/test/texgine/unittest" is_ok = true group("unittest") { testonly = true if (is_ok) { deps = [ ":texgine_unittest_part3" ] } } config("texgine_test_config") { include_dirs = [ "$graphic_2d_root/rosen/modules/texgine/export/texgine", "$graphic_2d_root/rosen/modules/texgine/src", "$graphic_2d_root/rosen/modules/texgine/src/opentype_parser", "$graphic_2d_root/rosen/modules/texgine/texgine_drawing", "$graphic_2d_root/rosen/modules/texgine/texgine_drawing/src", ] } group("common_deps") { testonly = true public_deps = [ "$graphic_2d_root/rosen/build/icu:rosen_libicu_ohos", "$graphic_2d_root/rosen/modules/texgine:libtexgine", "$graphic_2d_root/rosen/modules/texgine/texgine_drawing:libtexgine_drawing", "$graphic_2d_root/utils/test_header:test_header", "//third_party/googletest:gmock", "//third_party/googletest:gtest", ] if (defined(use_rosen_drawing) && use_rosen_drawing) { public_deps += [ "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics" ] } } ohos_unittest("texgine_unittest_part3") { module_out_path = module_output_path if (defined(use_rosen_drawing) && use_rosen_drawing) { defines = [ "USE_ROSEN_DRAWING" ] } sources = [ "font_parser_test.cpp" ] public_configs = [ ":texgine_test_config" ] public_deps = [ ":common_deps" ] use_exceptions = true part_name = "graphic_2d" subsystem_name = "graphic" } ohos_unittest("texgine_unittest_part6") { module_out_path = module_output_path sources = [ "font_parser_test.cpp" ] public_configs = [ ":texgine_test_config" ] public_deps = [ ":common_deps" ] use_exceptions = true part_name = "graphic_2d" subsystem_name = "graphic" }