Spexygen Reference Manual 3.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
test1.c
Go to the documentation of this file.
1
#include "
header.h
"
2
#include "unity.h"
3
4
void
setUp
(
void
) {
5
}
6
7
void
tearDown
(
void
) {
8
}
9
10
/*!
11
@code_uid{TUN_PRJ_free_fun_00, zero input test}
12
@code_litem{Details}
13
This 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
*/
19
void
TUN_PRJ_free_fun_00
(
void
) {
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}
30
This 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
*/
36
void
TUN_PRJ_free_fun_01
(
void
) {
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
}
header.h
a header file in the project
free_fun
uint8_t const * free_fun(uint32_t x)
Free function brief description.
Definition
source.c:3
TUN_PRJ_free_fun_01
void TUN_PRJ_free_fun_01(void)
non-zero input test
Definition
test1.c:36
setUp
void setUp(void)
Definition
test1.c:4
tearDown
void tearDown(void)
Definition
test1.c:7
TUN_PRJ_free_fun_00
void TUN_PRJ_free_fun_00(void)
zero input test
Definition
test1.c:19
spex
test1.c
© 2005-
Quantum Leaps
|
Using Online Help
|
Spexygen 3.0.0
| created with
Spexygen
© 2005-
Quantum Leaps
|
Using Online Help
|
Spexygen 3.0.0
| created with
Spexygen