diff --git a/common/include/test/whitelistunittest/white_list_test.h b/common/include/test/whitelistunittest/white_list_test.h index 029aaedee301148cf3767ed8ed09a840eed6f6ef..ba8b346535767277572357b3e504b24686269dde 100644 --- a/common/include/test/whitelistunittest/white_list_test.h +++ b/common/include/test/whitelistunittest/white_list_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -25,8 +25,8 @@ class WhiteListTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; }; } // namespace DistributedInput } // namespace DistributedHardware diff --git a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h index e9a64b69a3ced954b99338ad67389aa6c1cd4005..5ef8a11b4ec4d49bb60be3345d9aced2ae9e2bd4 100644 --- a/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h +++ b/interfaces/inner_kits/test/unittest/distributed_input_inner_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -46,8 +46,8 @@ class DistributedInputInnerTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; int CheckSourceProxy() const; int CheckSinkProxy() const; diff --git a/services/sink/inputcollector/test/sinkcollectorunittest/distributed_input_collector_test.h b/services/sink/inputcollector/test/sinkcollectorunittest/distributed_input_collector_test.h index d963117d8ccf8349a4bbb6124cfae63a0ef82e8a..115fec66e59c1addb70ed271bba8b2dc3b4bc0ad 100644 --- a/services/sink/inputcollector/test/sinkcollectorunittest/distributed_input_collector_test.h +++ b/services/sink/inputcollector/test/sinkcollectorunittest/distributed_input_collector_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -28,8 +28,8 @@ class DistributedInputCollectorTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; class DInputSinkCollectorEventHandler : public AppExecFwk::EventHandler { public: diff --git a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h index faffb0aaef6ca1b968fbf6adc08774636817df36..e81bd1813d3d688332911faba0029f966af61ce3 100644 --- a/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h +++ b/services/sink/sinkmanager/test/sinkmanagerunittest/distributed_input_sinkmanager_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -36,8 +36,8 @@ class DistributedInputSinkManagerTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; class TestGetSinkScreenInfosCb : public OHOS::DistributedHardware::DistributedInput::GetSinkScreenInfosCallbackStub { diff --git a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h index 46d44bc0faeaf274b60d154505eafc6b7ddb0b51..c454aced97a221d8e9c6c0338d6ce876c961e551 100644 --- a/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h +++ b/services/sink/transport/test/sinktransunittest/distributed_input_sinktrans_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -33,8 +33,8 @@ class DistributedInputSinkTransTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; private: nlohmann::json jsonStr_; nlohmann::json jsonStr1_; diff --git a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h index 6d76e575f2e54266b4afc72a6ce9decc82d07c60..f06c88cf8369b97e3fff879882e40ef28dc7100f 100644 --- a/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h +++ b/services/source/inputinject/test/sourceinjectunittest/distributed_input_sourceinject_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -36,8 +36,8 @@ class DistributedInputSourceInjectTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; class TestInputNodeListener : public OHOS::DistributedHardware::DistributedInput::InputNodeListenerStub { public: TestInputNodeListener() = default; diff --git a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h index 1a757ed2dfb467c924d080fcc5b9df79ac5fda33..21f7a1f50621b250dc5c33669daef89de5b3b854 100644 --- a/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h +++ b/services/source/sourcemanager/test/sourcemanagerunittest/distributed_input_sourcemanager_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -48,8 +48,8 @@ class DistributedInputSourceManagerTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; class TestPrepareDInputCallback : public OHOS::DistributedHardware::DistributedInput::PrepareDInputCallbackStub { diff --git a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h index 7b4428805d3cc5013ecc36da94b8b3ef7ac38e2d..bafdef3fb3a115743b44c50be90c5279919c241d 100644 --- a/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h +++ b/services/source/transport/test/sourcetransunittest/distributed_input_sourcetrans_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -33,8 +33,8 @@ class DistributedInputSourceTransTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; }; } // namespace DistributedInput } // namespace DistributedHardware diff --git a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h index 0a3577b64b72da5379a72673ca684c9bff43e5f2..e9bd4947b1d0c97a05059ef867f448ff4ec0552f 100644 --- a/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h +++ b/sinkhandler/test/unittest/distributed_input_sinkhandler_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -35,8 +35,8 @@ class DistributedInputSinkHandlerTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; int32_t CheckSystemAbility(); }; } // namespace DistributedInput diff --git a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h index 9060f8344c6465e89b1abe25863a3ad574ad78f5..b7391bae276b34bc9d18ba026ef80e6f420b14a0 100644 --- a/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h +++ b/sourcehandler/test/unittest/distributed_input_sourcehandler_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -40,15 +40,15 @@ class DistributedInputSourceHandlerTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; int32_t CheckSystemAbility(); class TestRegisterDInputCallback : public OHOS::DistributedHardware::RegisterCallback { public: TestRegisterDInputCallback() = default; virtual ~TestRegisterDInputCallback() = default; - virtual int32_t OnRegisterResult(const std::string &devId, const std::string &dhId, int32_t status, + int32_t OnRegisterResult(const std::string &devId, const std::string &dhId, int32_t status, const std::string &data) override; }; @@ -56,7 +56,7 @@ public: public: TestUnregisterDInputCallback() = default; virtual ~TestUnregisterDInputCallback() = default; - virtual int32_t OnUnregisterResult(const std::string &devId, const std::string &dhId, int32_t status, + int32_t OnUnregisterResult(const std::string &devId, const std::string &dhId, int32_t status, const std::string &data) override; }; }; diff --git a/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp b/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp index 30217ec80fc56f02f5df90bee4062abc7af8ff9d..04af8fefe8edd533b35189da6516256067e9cece 100644 --- a/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp +++ b/test/fuzztest/distributedinputkit_fuzzer/distributed_input_kit_fuzzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 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 @@ -88,7 +88,7 @@ public: class TestIStartStopDInputsCallback : public OHOS::DistributedHardware ::DistributedInput::IStartStopDInputsCallback { public: - virtual void OnResultDhids(const std::string &devId, const int32_t &status) override + void OnResultDhids(const std::string &devId, const int32_t &status) override { (void)devId; (void)status; diff --git a/utils/test/unittest/dinput_context_test.h b/utils/test/unittest/dinput_context_test.h index 0a471de69a24d9736e5bdb7242bb672ffb906fad..f6fa9295a0b3fdf113269368e3b4775fb3e1c0bb 100644 --- a/utils/test/unittest/dinput_context_test.h +++ b/utils/test/unittest/dinput_context_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -25,8 +25,8 @@ class DInputContextTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; }; } // namespace DistributedInput } // namespace DistributedHardware