mirror of
https://github.com/google/pebble.git
synced 2025-03-15 16:51:21 +00:00
28 lines
686 B
C
28 lines
686 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "options.pb.h"
|
|
#include "unittests.h"
|
|
|
|
int main()
|
|
{
|
|
int status = 0;
|
|
|
|
{
|
|
HasFieldMessage msg1 = HasFieldMessage_init_default;
|
|
HasFieldMessage msg2 = HasFieldMessage_init_zero;
|
|
|
|
COMMENT("Test default_has option");
|
|
|
|
/* Default initializer should obey has_default setting */
|
|
TEST(msg1.has_present == true);
|
|
TEST(msg1.has_missing == false);
|
|
TEST(msg1.has_normal == false);
|
|
|
|
/* Zero initializer should always have false */
|
|
TEST(msg2.has_present == false);
|
|
TEST(msg2.has_missing == false);
|
|
TEST(msg2.has_normal == false);
|
|
}
|
|
|
|
return status;
|
|
}
|