mirror of
https://github.com/google/pebble
synced 2026-10-18 01:04:12 +02:00
Import of the watch repository from Pebble
This commit is contained in:
@@ -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")
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message SecondOneof {
|
||||
repeated int32 foo = 1;
|
||||
}
|
||||
|
||||
message AnotherList {
|
||||
repeated int32 bar = 1;
|
||||
}
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user