| 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"> |