提交 11af312f 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 8b683657
......@@ -110,7 +110,6 @@ HCTest and the C language are used to develop test cases. HCTest is enhanced and
│ │ └── BUILD.gn
```
2. Write the test case in the **src** directory.
(1) Include the test framework header file.
......@@ -130,29 +129,25 @@ HCTest and the C language are used to develop test cases. HCTest is enhanced and
*/
LITE_TEST_SUIT(test, example, IntTestSuite);
```
(3) Define Setup and TearDown.
Format: Test suite name+Setup, Test suite name+TearDown.
The Setup and TearDown functions must exist, but function bodies can be empty.
​ Format: Test suite name+Setup, Test suite name+TearDown.
(4) Use the **LITE_TEST_CASE** macro to write the test case.
​ The Setup and TearDown functions must exist, but function bodies can be empty.
Three parameters are involved: test suite name, test case name, and test case properties (including type, granularity, and level).
(4) Use the **LITE_TEST_CASE** macro to write the test case.
​ Three parameters are involved: test suite name, test case name, and test case properties (including type, granularity, and level).
```
LITE_TEST_CASE(IntTestSuite, TestCase001, Function | MediumTest | Level1)
{
// Do something.
};
```
(5) Use the **RUN_TEST_SUITE** macro to register the test suite.
```
RUN_TEST_SUITE(IntTestSuite);
```
3. Create the configuration file (**BUILD.gn**) of the test module.
Create a **BUILD.gn** (example) file in each test module directory, and specify the name of the built static library and its dependent header files and libraries.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册