1 /* 2 * Copyright (C) 2022 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 "adaptor_time_test.h" 17 18 #include <gtest/gtest.h> 19 20 #include "adaptor_time.h" 21 22 namespace OHOS { 23 namespace UserIam { 24 namespace PinAuth { 25 using namespace testing; 26 using namespace testing::ext; 27 SetUpTestCase()28void AdaptorTimeTest::SetUpTestCase() 29 { 30 } 31 TearDownTestCase()32void AdaptorTimeTest::TearDownTestCase() 33 { 34 } 35 SetUp()36void AdaptorTimeTest::SetUp() 37 { 38 } 39 TearDown()40void AdaptorTimeTest::TearDown() 41 { 42 } 43 44 /** 45 * @tc.name: Get Time API test 46 * @tc.desc: verify GetRtcTime and GetSystemTime 47 * @tc.type: FUNC 48 * @tc.require: #I64XCB 49 */ 50 HWTEST_F(AdaptorTimeTest, Get_Time_test, TestSize.Level1) 51 { 52 uint64_t result = GetRtcTime(); 53 EXPECT_NE(result, 0); 54 result = GetSystemTime(); 55 EXPECT_NE(result, 0); 56 } 57 } // namespace PinAuth 58 } // namespace UserIam 59 } // namespace OHOS 60