# Copyright (c) 2022 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") if (is_standard_system) { module_output_path = "jsutil_util/napi" } ohos_unittest("test_util_unittest") { module_out_path = module_output_path configs = [ "//arkcompiler/ets_runtime:ark_jsruntime_public_config" ] include_dirs = [ "//arkcompiler/ets_runtime", "//foundation/arkui/napi/native_engine", "//foundation/arkui/napi/native_engine/impl/ark", "//third_party/openssl", "//third_party/openssl/include", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source", ] cflags = [ "-g3" ] sources = [ "../../util/js_base64.cpp", "../../util/js_textdecoder.cpp", "../../util/js_textencoder.cpp", "../../util/js_uuid.cpp", "test_ark.cpp", "test_util.cpp", ] deps = [ "//arkcompiler/ets_runtime:libark_jsruntime", "//foundation/arkui/napi/:ace_napi", "//foundation/arkui/napi/:ace_napi_ark", "//third_party/icu/icu4c:static_icuuc", "//third_party/libuv:uv_static", "//third_party/openssl:libcrypto_static", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } group("unittest") { testonly = true deps = [ ":test_util_unittest" ] }