Import of the watch repository from Pebble

This commit is contained in:
Matthieu Jeanson 2024-12-12 16:43:03 -08:00 committed by Katharine Berry
commit 3b92768480
10334 changed files with 2564465 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# Regression test for #693:
# Duplicate declarations of size_unions with repeated fields inside a oneof
Import("env")
env.NanopbProto("other.proto")
env.NanopbProto(["oneof.proto", "other.proto"])
env.Object("oneof.pb.c")
env.Object("test.c")

View file

@ -0,0 +1,19 @@
syntax = "proto3";
import "other.proto";
message FirstOneof {}
message Bar {
oneof content {
FirstOneof first = 1;
SecondOneof second = 2; // unknown size if no options are considered
}
}
message Foo {
AnotherList foo = 1; // again, unknown size
Bar bar = 2; // no duplicate size_union shall be generated anymore
}

View file

@ -0,0 +1,9 @@
syntax = "proto3";
message SecondOneof {
repeated int32 foo = 1;
}
message AnotherList {
repeated int32 bar = 1;
}

View file

@ -0,0 +1,7 @@
/* This fakes the situation where other.proto was not found at generation time,
so size_union declarations are generated. */
#define SecondOneof_size 88
#define AnotherList_size 88
#include "oneof.pb.h"