mirror of
https://github.com/google/pebble.git
synced 2025-06-28 19:56:16 +00:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
28
third_party/nanopb/tests/options/options.c
vendored
Normal file
28
third_party/nanopb/tests/options/options.c
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
#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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue