1 /* 2 * Copyright (c) 2021-2023 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 #include "input_method_utils.h" 16 17 #include <cstdint> 18 #include <gtest/gtest.h> 19 #include <string> 20 #include <sys/time.h> 21 #include <unistd.h> 22 23 #include "global.h" 24 25 using namespace testing::ext; 26 namespace OHOS { 27 namespace MiscServices { 28 class InputMethodUtilsTest : public testing::Test { 29 public: 30 static void SetUpTestCase(void); 31 static void TearDownTestCase(void); 32 void SetUp(); 33 void TearDown(); 34 }; 35 SetUpTestCase(void)36void InputMethodUtilsTest::SetUpTestCase(void) 37 { 38 IMSA_HILOGI("InputMethodUtilsTest::SetUpTestCase"); 39 } 40 TearDownTestCase(void)41void InputMethodUtilsTest::TearDownTestCase(void) 42 { 43 IMSA_HILOGI("InputMethodUtilsTest::TearDownTestCase"); 44 } 45 SetUp(void)46void InputMethodUtilsTest::SetUp(void) 47 { 48 IMSA_HILOGI("InputMethodUtilsTest::SetUp"); 49 } 50 TearDown(void)51void InputMethodUtilsTest::TearDown(void) 52 { 53 IMSA_HILOGI("InputMethodUtilsTest::TearDown"); 54 } 55 56 /** 57 * @tc.name: inputMethodUtils_functionKey_001 58 * @tc.desc: Checkout FunctionKey. 59 * @tc.type: FUNC 60 */ 61 HWTEST_F(InputMethodUtilsTest, inputMethodUtils_functionKey_001, TestSize.Level0) 62 { 63 FunctionKey info; 64 info.SetEnterKeyType(EnterKeyType::UNSPECIFIED); 65 EnterKeyType keyType = info.GetEnterKeyType(); 66 EXPECT_EQ(keyType, EnterKeyType::UNSPECIFIED); 67 } 68 } // namespace MiscServices 69 } // namespace OHOS