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
6int 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}
int main()
Definition options.c:6
#define TEST(x)
Definition test.h:3
#define COMMENT(x)
Definition unittests.h:17