MOS Source Code
Loading...
Searching...
No Matches
options.c
Go to the documentation of this file.
1
#include <stdlib.h>
2
#include <stdio.h>
3
#include "options.pb.h"
4
#include "
unittests.h
"
5
6
int
main
()
7
{
8
int
status = 0;
9
10
{
11
HasFieldMessage msg1 = HasFieldMessage_init_default;
12
HasFieldMessage msg2 = HasFieldMessage_init_zero;
13
14
COMMENT
(
"Test default_has option"
);
15
16
/* Default initializer should obey has_default setting */
17
TEST
(msg1.has_present ==
true
);
18
TEST
(msg1.has_missing ==
false
);
19
TEST
(msg1.has_normal ==
false
);
20
21
/* Zero initializer should always have false */
22
TEST
(msg2.has_present ==
false
);
23
TEST
(msg2.has_missing ==
false
);
24
TEST
(msg2.has_normal ==
false
);
25
}
26
27
return
status;
28
}
main
int main()
Definition
options.c:6
TEST
#define TEST(x)
Definition
test.h:3
unittests.h
COMMENT
#define COMMENT(x)
Definition
unittests.h:17
libs
nanopb
nanopb
tests
options
options.c
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0