Spexygen Reference Manual 3.0.0
Loading...
Searching...
No Matches
test1.c
Go to the documentation of this file.
1#include "header.h"
2#include "unity.h"
3
4void setUp(void) {
5}
6
7void tearDown(void) {
8}
9
10/*!
11@code_uid{TUN_PRJ_free_fun_00, zero input test}
12@code_litem{Details}
13This test checks that zero input to free_fun() produces zero array.
14@code_bw_trace{brief}
15- [@tr{SRS_EXA_REQ_01}] <i>My project shall provide a free function foo().</i>
16- [@tr{free_fun()}] <i>Free function brief description</i>
17@endcode_uid
18*/
20 uint8_t const *result = free_fun(0U);
21 TEST_ASSERT_EQUAL_UINT8(0, result[0]);
22 TEST_ASSERT_EQUAL_UINT8(0, result[1]);
23 TEST_ASSERT_EQUAL_UINT8(0, result[2]);
24 TEST_ASSERT_EQUAL_UINT8(0, result[3]);
25}
26
27/*!
28@code_uid{TUN_PRJ_free_fun_01, non-zero input test}
29@code_litem{Details}
30This test checks that non-zero input to free_fun() produces expected array.
31@code_bw_trace
32- [@tr{SRS_EXA_REQ_01}]
33- [@tr{free_fun()}]
34@endcode_uid
35*/
37 uint8_t const* result = free_fun(0x1A2B3C4CU);
38 TEST_ASSERT_EQUAL_UINT8(0x1A, result[0]);
39 TEST_ASSERT_EQUAL_UINT8(0x2B, result[1]);
40 TEST_ASSERT_EQUAL_UINT8(0x3C, result[2]);
41 TEST_ASSERT_EQUAL_UINT8(0x4D, result[3]);
42}
a header file in the project
uint8_t const * free_fun(uint32_t x)
Free function brief description.
Definition source.c:3
void TUN_PRJ_free_fun_01(void)
non-zero input test
Definition test1.c:36
void setUp(void)
Definition test1.c:4
void tearDown(void)
Definition test1.c:7
void TUN_PRJ_free_fun_00(void)
zero input test
Definition test1.c:19