1# Copyright (c) 2021 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") 15 16if (is_standard_system) { 17 module_output_path = "jsapi_api/napi" 18} 19 20ohos_unittest("test_xml_unittest") { 21 module_out_path = module_output_path 22 23 configs = [ "//ark/js_runtime:ark_jsruntime_public_config" ] 24 include_dirs = [ 25 "//base/compileruntime/js_api_module/xml", 26 "//ark/js_runtime", 27 "//foundation/ace/napi", 28 "//foundation/ace/napi/interfaces/kits", 29 "//foundation/ace/napi/native_engine", 30 "//foundation/ace/napi/native_engine/impl/ark", 31 "//third_party/googletest/include", 32 "//third_party/node/src", 33 "//utils/native/base/include", 34 ] 35 36 cflags = [ "-g3" ] 37 38 sources = [ 39 "test_ark.cpp", 40 "test_xml.cpp", 41 ] 42 43 deps = [ 44 "//ark/js_runtime:libark_jsruntime", 45 "//base/compileruntime/js_api_module/xml:xml_packages", 46 "//foundation/ace/napi/:ace_napi", 47 "//foundation/ace/napi/:ace_napi_ark", 48 "//third_party/googletest:gtest", 49 "//third_party/googletest:gtest_main", 50 "//third_party/icu/icu4c:static_icuuc", 51 "//third_party/libuv:uv_static", 52 "//utils/native/base:utils", 53 "//utils/native/base:utilsecurec", 54 ] 55 56 if (is_standard_system) { 57 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 58 } else { 59 external_deps = [ "hilog:libhilog" ] 60 } 61} 62 63group("unittest") { 64 testonly = true 65 deps = [ ":test_xml_unittest" ] 66} 67