docs/Writerside/topics/test.h.md

changeset 1694
a2757c6427cc
parent 1601
e47078681a6f
equal deleted inserted replaced
1693:c2d05cf1a062 1694:a2757c6427cc
14 cx_test_register(suite, test_bar); 14 cx_test_register(suite, test_bar);
15 cx_test_register(suite, test_baz); 15 cx_test_register(suite, test_baz);
16 ``` 16 ```
17 17
18 A test case needs to be defined with the `CX_TEST` macro. 18 A test case needs to be defined with the `CX_TEST` macro.
19 The general structure of a test case is 1) setup code, 2) the actual test, 3) tear down code. 19 The general structure of a test case is 1) setup code, 2) the actual test, 3) tear-down code.
20 In UCX this is realized by the `CX_TEST_DO` macro with which you can define a scope for the actual test. 20 In UCX this is realized by the `CX_TEST_DO` macro with which you can define a scope for the actual test.
21 Whenever a test assertion fails, the scope is exited and the tear-down code is executed. 21 Whenever a test assertion fails, the scope is exited and the tear-down code is executed.
22 22
23 <tabs> 23 <tabs>
24 <tab title="Test"> 24 <tab title="Test">

mercurial