133eb0b6dSopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd.
233eb0b6dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
333eb0b6dSopenharmony_ci# you may not use this file except in compliance with the License.
433eb0b6dSopenharmony_ci# You may obtain a copy of the License at
533eb0b6dSopenharmony_ci#
633eb0b6dSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
733eb0b6dSopenharmony_ci#
833eb0b6dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
933eb0b6dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1033eb0b6dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1133eb0b6dSopenharmony_ci# See the License for the specific language governing permissions and
1233eb0b6dSopenharmony_ci# limitations under the License.
1333eb0b6dSopenharmony_ci
1433eb0b6dSopenharmony_ciimport("//foundation/arkui/napi/napi.gni")
1533eb0b6dSopenharmony_ci
1633eb0b6dSopenharmony_ciimport("//build/test.gni")
1733eb0b6dSopenharmony_ciimport("//foundation/arkui/napi/test/unittest/ut.gni")
1833eb0b6dSopenharmony_ci
1933eb0b6dSopenharmony_ciohos_unittest("test_ark_interop") {
2033eb0b6dSopenharmony_ci  module_out_path = module_output_path
2133eb0b6dSopenharmony_ci
2233eb0b6dSopenharmony_ci  include_dirs = ark_include
2333eb0b6dSopenharmony_ci  include_dirs += [
2433eb0b6dSopenharmony_ci    "../../../interfaces/inner_api/cjffi/ark_interop/",
2533eb0b6dSopenharmony_ci    "../../../interfaces/inner_api/cjffi/ark_interop_helper/",
2633eb0b6dSopenharmony_ci  ]
2733eb0b6dSopenharmony_ci
2833eb0b6dSopenharmony_ci  cflags = [ "-g3" ]
2933eb0b6dSopenharmony_ci
3033eb0b6dSopenharmony_ci  sources = [ "test_ark_interop.cpp" ]
3133eb0b6dSopenharmony_ci
3233eb0b6dSopenharmony_ci  deps = [
3333eb0b6dSopenharmony_ci    "../../..:ace_napi",
3433eb0b6dSopenharmony_ci    "../../../interfaces/inner_api/cjffi/ark_interop:ark_interop",
3533eb0b6dSopenharmony_ci    "//third_party/libuv:uv",
3633eb0b6dSopenharmony_ci  ]
3733eb0b6dSopenharmony_ci  defines = []
3833eb0b6dSopenharmony_ci  if (use_clang_coverage) {
3933eb0b6dSopenharmony_ci    defines += [ "CLANG_COVERAGE" ]
4033eb0b6dSopenharmony_ci  }
4133eb0b6dSopenharmony_ci
4233eb0b6dSopenharmony_ci  external_deps = [
4333eb0b6dSopenharmony_ci    "ets_runtime:libark_jsruntime",
4433eb0b6dSopenharmony_ci    "eventhandler:libeventhandler",
4533eb0b6dSopenharmony_ci    "hilog:libhilog",
4633eb0b6dSopenharmony_ci  ]
4733eb0b6dSopenharmony_ci}
4833eb0b6dSopenharmony_ci
4933eb0b6dSopenharmony_cigroup("cj_native_unittest") {
5033eb0b6dSopenharmony_ci  testonly = true
5133eb0b6dSopenharmony_ci  deps = [ ":test_ark_interop" ]
5233eb0b6dSopenharmony_ci}
53