• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
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_SUITE_FUNCTIONS_PROCESSOR_H
17 #define TEST_SUITE_FUNCTIONS_PROCESSOR_H
18 
19 #include <stdint.h>
20 #include "common_def.h"
21 #include "test_suite.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 #endif /* __cplusplus */
28 
29 /**
30  * @defgroup test_common_testsuite_funcs_processor Functions Processor
31  * @ingroup  test_common_testsuite
32  * @{
33  */
34 
35 /**
36  * @if Eng
37  * @brief  Adds a function to the testsuite functions list.
38  * @param  [in]  name The external 'user' name of the function.
39  * @param  [in]  description A brief description of the function.
40  * @param  [in]  func function pointer to the function.
41  * @retval ERRCODE_SUCC The function has been added.
42  * @retval Other        Too many functions have been added. For details, see @ref errcode_t.
43  * @else
44  * @brief  添加需要功能测试到测试套件的列表中。
45  * @param  [in]  name 测试的功能函数名字。
46  * @param  [in]  description 简要的功能测试描述。
47  * @param  [in]  func 功能测试函数接口。
48  * @retval ERRCODE_SUCC 函数添加成功。
49  * @retval Other        函数添加超过最大数量。 参考 see @ref errcode_t 。
50  * @endif
51  */
52 errcode_t test_suite_function_add_func(char *name, char *description, test_suite_function_callback_t func);
53 
54 /**
55  * @if Eng
56  * @brief  Init testsuite function list.
57  * @else
58  * @brief  初始化测试用例函数列表。
59  * @endif
60  */
61 void test_suite_function_init(void);
62 
63 /**
64  * @if Eng
65  * @brief  Deinit function that delete all of the stored testsuit functions.
66  * @else
67  * @brief  删除所有已注册的测试函数接口。
68  * @endif
69  */
70 void test_suite_function_deinit(void);
71 
72 /**
73  * @if Eng
74  * @brief  Generic function that list all of the stored testsuit functions out of the channel.
75  * @else
76  * @brief  通过通道输出所有已注册的功能测试接口。
77  * @endif
78  */
79 void test_suite_function_list_func(void);
80 
81 /**
82  * @if Eng
83  * @brief  Executes the command.
84  * @param  [in]  command The command to execute.
85  * @else
86  * @brief  执行命令。
87  * @param  [in]  command 要处理的命令。
88  * @endif
89  */
90 void test_suite_function_execute_command(char *command);
91 
92 /**
93  * @}
94  */
95 
96 #ifdef __cplusplus
97 #if __cplusplus
98 }
99 #endif /* __cplusplus */
100 #endif /* __cplusplus */
101 
102 #endif
103