• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/test.gni")
15
16if (is_standard_system) {
17  module_output_path = "jsutil_util/napi"
18}
19
20ohos_unittest("test_util_unittest") {
21  module_out_path = module_output_path
22
23  configs = [ "//arkcompiler/ets_runtime:ark_jsruntime_public_config" ]
24  include_dirs = [
25    "//arkcompiler/ets_runtime",
26    "//foundation/arkui/napi/native_engine",
27    "//foundation/arkui/napi/native_engine/impl/ark",
28    "//third_party/openssl",
29    "//third_party/openssl/include",
30    "//third_party/icu/icu4c/source/common",
31    "//third_party/icu/icu4c/source",
32  ]
33
34  cflags = [ "-g3" ]
35
36  sources = [
37    "../../util/js_base64.cpp",
38    "../../util/js_textdecoder.cpp",
39    "../../util/js_textencoder.cpp",
40    "../../util/js_uuid.cpp",
41    "test_ark.cpp",
42    "test_util.cpp",
43  ]
44
45  deps = [
46    "//arkcompiler/ets_runtime:libark_jsruntime",
47    "//foundation/arkui/napi/:ace_napi",
48    "//foundation/arkui/napi/:ace_napi_ark",
49    "//third_party/icu/icu4c:static_icuuc",
50    "//third_party/libuv:uv_static",
51    "//third_party/openssl:libcrypto_static",
52  ]
53
54  if (is_standard_system) {
55    external_deps = [
56      "c_utils:utils",
57      "hiviewdfx_hilog_native:libhilog",
58    ]
59  } else {
60    external_deps = [
61      "c_utils:utils",
62      "hilog:libhilog",
63    ]
64  }
65}
66
67group("unittest") {
68  testonly = true
69  deps = [ ":test_util_unittest" ]
70}
71