1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef TEST_UNITTEST_CORE_PIPELINE_VELOCITY_TRACKER_TEST_H 17 #define TEST_UNITTEST_CORE_PIPELINE_VELOCITY_TRACKER_TEST_H 18 19 #include <string> 20 #include <vector> 21 #include <utility> 22 23 #include "gmock/gmock.h" 24 #include "gtest/gtest.h" 25 26 #define private public 27 #define protected public 28 #include "test/mock/core/pipeline/mock_pipeline_context.h" 29 30 #include "base/geometry/offset.h" 31 #include "base/geometry/ng/offset_t.h" 32 #include "core/common/ace_engine.h" 33 #include "core/event/ace_events.h" 34 #include "core/event/axis_event.h" 35 #include "core/event/touch_event.h" 36 #include "core/pipeline/base/element_register.h" 37 #include "core/pipeline/pipeline_context.h" 38 #include "core/pipeline_ng/pipeline_context.h" 39 #include "frameworks/core/common/event_manager.h" 40 41 #include "core/gestures/velocity_tracker.h" 42 43 namespace OHOS::Ace::NG { 44 namespace { 45 constexpr float TO_TRUE_DATA = 8.0; 46 constexpr float TOUCH_STILL_THRESHOLD = 0.5; 47 constexpr int32_t RATIO_MS_TO_US = 1000; 48 constexpr int32_t RATIO_NS_TO_US = 1000; 49 } // namespace 50 51 class VelocityTrackerTest : public testing::Test { 52 public: 53 static void SetUpTestSuite(); 54 static void TearDownTestSuite(); 55 void SetUp() override; 56 void TearDown() override; 57 }; 58 SetUpTestSuite()59void VelocityTrackerTest::SetUpTestSuite() {} 60 TearDownTestSuite()61void VelocityTrackerTest::TearDownTestSuite() {} 62 SetUp()63void VelocityTrackerTest::SetUp() {} 64 TearDown()65void VelocityTrackerTest::TearDown() {} 66 67 } // namespace OHOS::Ace::NG 68 69 #endif // TEST_UNITTEST_CORE_PIPELINE_VELOCITY_TRACKER_TEST_H