1# Copyright (c) 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("//arkcompiler/ets_runtime/common_components/tests/test_helper.gni") 15 16module_output_path = "common_component" 17 18host_unittest_action("Base_String_Test") { 19 module_out_path = module_output_path 20 21 sources = [ 22 # test file 23 "base_string_test.cpp", 24 "//arkcompiler/ets_runtime/common_components/objects/base_string.cpp", 25 "//arkcompiler/ets_runtime/common_components/base/utf_helper.cpp", 26 ] 27 28 configs = [ 29 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 30 "//arkcompiler/ets_runtime:icu_path_test_config", 31 ] 32 33 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 34 35 # hiviewdfx libraries 36 external_deps = [ 37 "icu:shared_icui18n", 38 "icu:shared_icuuc", 39 "zlib:libz", 40 ] 41} 42 43host_unittest_action("Base_String_Table_Test") { 44 module_out_path = module_output_path 45 46 sources = [ 47 # test file 48 "base_string_table_test.cpp", 49 ] 50 51 configs = [ 52 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 53 "//arkcompiler/ets_runtime:icu_path_test_config", 54 ] 55 56 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 57 58 # hiviewdfx libraries 59 external_deps = [ 60 "icu:shared_icui18n", 61 "icu:shared_icuuc", 62 "zlib:libz", 63 ] 64} 65 66host_unittest_action("Composite_Base_Class_Test") { 67 module_out_path = module_output_path 68 69 sources = [ 70 # test file 71 "composite_base_class_test.cpp", 72 "//arkcompiler/ets_runtime/common_components/objects/base_string.cpp", 73 "//arkcompiler/ets_runtime/common_components/base/utf_helper.cpp", 74 "base_string_table_test.cpp", 75 ] 76 77 configs = [ 78 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 79 "//arkcompiler/ets_runtime:icu_path_test_config", 80 ] 81 82 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 83 84 # hiviewdfx libraries 85 external_deps = [ 86 "icu:shared_icui18n", 87 "icu:shared_icuuc", 88 "zlib:libz", 89 ] 90} 91 92 93group("unittest") { 94 testonly = true 95 96 # deps file 97 deps = [ 98 ":Base_String_Test", 99 ":Base_String_Table_Test", 100 ":Composite_Base_Class_Test", 101 ] 102} 103 104group("host_unittest") { 105 testonly = true 106 107 # deps file 108 deps = [ 109 ":Base_String_TestAction", 110 ":Base_String_Table_TestAction", 111 ":Composite_Base_Class_TestAction", 112 ] 113} 114