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 #include <gtest/gtest.h> 17 #include <limits> 18 #include <test_header.h> 19 20 #include "hgm_frame_rate_manager.h" 21 #include "hgm_user_define.h" 22 23 using namespace testing; 24 using namespace testing::ext; 25 26 namespace OHOS { 27 namespace Rosen { 28 class HgmUserDefineTest : public testing::Test { 29 public: SetUpTestCase()30 static void SetUpTestCase() {} TearDownTestCase()31 static void TearDownTestCase() {} SetUp()32 void SetUp() {} TearDown()33 void TearDown() {} 34 }; 35 36 /** 37 * @tc.name: Init 38 * @tc.desc: Verify the result of Init function 39 * @tc.type: FUNC 40 * @tc.require: 41 */ 42 HWTEST_F(HgmUserDefineTest, Init, Function | SmallTest | Level0) 43 { 44 HgmUserDefine userDefine; 45 userDefine.Init(); 46 ASSERT_NE(userDefine.impl_, nullptr); 47 48 HgmFrameRateManager framRateManager; 49 framRateManager.Init(nullptr, nullptr, nullptr, nullptr); 50 ASSERT_NE(framRateManager.userDefine_.impl_, nullptr); 51 } 52 } // namespace Rosen 53 } // namespace OHOS 54