blob: 772080022fdbdac70673d93e7b6ece4678456dde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
---
:cmock:
:plugins:
- # none
:skeleton_path: system/generated
:systest:
:types: |
#define UINT32 unsigned int
:mockable: |
UINT32 something(int a);
:skeleton: skeleton.h
:source:
:header: |
void function_a(void);
int function_b(int a, int b);
const char* function_c(void);
# we are purposefully not including a :code section because it will be generated with skeleton
:tests:
:common: |
void setUp(void) {}
void tearDown(void) {}
:units:
- :pass: TRUE
:should: 'generate an empty shell for functions with no return values'
:code: |
test()
{
function_a();
}
- :pass: TRUE
:should: 'return numerical zero for numerical return values'
:code: |
test()
{
TEST_ASSERT_EQUAL_INT(0, function_b(1, 2));
}
- :pass: TRUE
:should: 'return null for pointer return values'
:code: |
test()
{
TEST_ASSERT_NULL(function_c());
}
...
|