调整UT文件结构

Signed-off-by: wuliangdong <wuliangdong1@huawei.com>
Change-Id: Ia736ae1aba3338cdb69550c03e9ce8b0dc394552
This commit is contained in:
wuliangdong 2023-03-08 07:56:58 +00:00
parent 16dc669071
commit f3be2fd826
5 changed files with 70 additions and 30 deletions

View File

@ -59,7 +59,8 @@
"//base/msdp/device_status/test:devicestatussystem_test",
"//base/msdp/device_status/libs/test:devicestatuslib_test",
"//base/msdp/device_status:device_status_tests",
"//base/msdp/device_status/test/fuzztest:device_status_fuzztest"
"//base/msdp/device_status/test/fuzztest:device_status_fuzztest",
"//base/msdp/device_status//frameworks/native/interaction/test:interaction_manager_test"
]
}
}

View File

@ -0,0 +1,21 @@
# Copyright (c) 2023 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("//base/msdp/device_status/device_status.gni")
import("//build/test.gni")
group("interaction_manager_test") {
testonly = true
deps = []
deps += [ "unittest:unittest" ]
}

View File

@ -0,0 +1,46 @@
# Copyright (c) 2023 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("//base/msdp/device_status/device_status.gni")
import("//build/ohos.gni")
import("//build/test.gni")
module_output_path = "${device_status_part_name}/unit_out"
ohos_unittest("InteractionManagerTest") {
module_out_path = module_output_path
include_dirs = [
"${device_status_interfaces_path}/innerkits/interaction/include",
"${device_status_utils_path}/include",
]
defines = []
sources = [ "${device_status_frameworks_path}/native/interaction/test/unittest/src/interaction_manager_test.cpp" ]
configs = []
deps = [ "${device_status_interfaces_path}/innerkits:devicestatus_client" ]
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"input:libmmi-client",
"multimedia_image_framework:image_native",
]
}
group("unittest") {
testonly = true
deps = []
deps += [ ":InteractionManagerTest" ]
}

View File

@ -50,6 +50,7 @@ constexpr int32_t DRAG_NUM { 1 };
constexpr int32_t MOVE_STEP { 10 };
#define INPUT_MANAGER MMI::InputManager::GetInstance()
} // namespace
class InteractionManagerTest : public testing::Test {
public:
void SetUp();

View File

@ -14,7 +14,6 @@
import("//base/msdp/device_status/device_status.gni")
import("//build/ohos.gni")
import("//build/test.gni")
module_output_path = "device_status/unit_out"
config("devicestatus_private_config") {
include_dirs = [ "//utils/system/safwk/native/include" ]
@ -79,31 +78,3 @@ ohos_shared_library("devicestatus_client") {
part_name = "${device_status_part_name}"
}
ohos_unittest("InteractionManagerTest") {
module_out_path = module_output_path
include_dirs = [
"${device_status_interfaces_path}/innerkits/interaction/include",
"${device_status_utils_path}/include",
]
defines = []
sources = [ "${device_status_frameworks_path}/native/interaction/test/interaction_manager_test.cpp" ]
configs = []
deps = [ "${device_status_interfaces_path}/innerkits:devicestatus_client" ]
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"input:libmmi-client",
"multimedia_image_framework:image_native",
]
}
group("unittest") {
testonly = true
deps = []
deps += [ ":InteractionManagerTest" ]
}