# 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") import("//foundation/distributeddatamgr/data_object/data_object.gni") module_output_path = "data_object/impl" data_object_base_path = "//foundation/distributeddatamgr/data_object" data_object_innerkits_path = "${data_object_base_path}/frameworks/innerkitsimpl" kv_store_include_path = "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb" config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "./mock/include", "${data_object_innerkits_path}/include/adaptor", "${data_object_innerkits_path}/include/common", "${data_object_innerkits_path}/include/communicator", "${data_object_innerkits_path}/include", "${kv_store_include_path}/include", "${kv_store_include_path}/interfaces/include/", "${kv_store_include_path}/interfaces/include/relational", "//foundation/distributeddatamgr/kv_store/frameworks/common", "${relational_store_path}/interfaces/inner_api/common_type/include", ] } ohos_unittest("NativeObjectStoreTest") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } module_out_path = module_output_path sources = [ "mock/src/mock_soft_bus.cpp", "src/app_pipe_mgr_test.cpp", "src/communicator_test.cpp", "src/object_store_test.cpp", "src/process_communicator_impl_test.cpp", ] configs = [ ":module_private_config" ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "hilog:libhilog", ] deps = [ "//foundation/distributeddatamgr/data_object/interfaces/innerkits:distributeddataobject_static", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] } group("unittest") { testonly = true deps = [ ":NativeObjectStoreTest" ] }