1 /*
2 * Copyright (c) 2021 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 "hctest.h"
17 #include "iot_errno.h"
18 #include "lowpower.h"
19
20 unsigned int (*g_lpcInit)(void);
21 unsigned int (*g_lpcSetType)(LpcType type);
22
23 /**
24 * @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
25 * @param : subsystem name is wifiiot
26 * @param : module name is wifiiotlite
27 * @param : test suit name is UtilsFileFuncTestSuite
28 */
29 LITE_TEST_SUIT(wifiiot, wifiiotlite, IotLowPowerTestSuite);
30
31 /**
32 * @tc.setup : setup for all testcases
33 * @return : setup result, TRUE is success, FALSE is fail
34 */
IotLowPowerTestSuiteSetUp(void)35 static BOOL IotLowPowerTestSuiteSetUp(void)
36 {
37 return TRUE;
38 }
39
40 /**
41 * @tc.teardown : teardown for all testcases
42 * @return : teardown result, TRUE is success, FALSE is fail
43 */
IotLowPowerTestSuiteTearDown(void)44 static BOOL IotLowPowerTestSuiteTearDown(void)
45 {
46 printf("+-------------------------------------------+\n");
47 return TRUE;
48 }
49
50 /**
51 * @tc.number : SUB_UTILS_WIFIIOT_API_7000
52 * @tc.name : UART operation with LpcInit
53 * @tc.desc : [C- SOFTWARE -0200]
54 */
55 LITE_TEST_CASE(IotLowPowerTestSuite, testIotLowPower001, Function | MediumTest | Level1)
56 {
57 g_lpcInit =LpcInit;
58 };
59
60 /**
61 * @tc.number : SUB_UTILS_WIFIIOT_API_7100
62 * @tc.name : UART operation with IoTWatchDogKick
63 * @tc.desc : [C- SOFTWARE -0200]
64 */
65 LITE_TEST_CASE(IotLowPowerTestSuite, testIotLowPower002, Function | MediumTest | Level1)
66 {
67 g_lpcSetType = LpcSetType;
68 };
69
70 RUN_TEST_SUITE(IotLowPowerTestSuite);
71
72