mirror of
https://github.com/google/pebble.git
synced 2025-07-23 15:54:54 -04:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
9
third_party/nanopb/tests/regression/issue_692/SConscript
vendored
Normal file
9
third_party/nanopb/tests/regression/issue_692/SConscript
vendored
Normal 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")
|
19
third_party/nanopb/tests/regression/issue_692/oneof.proto
vendored
Normal file
19
third_party/nanopb/tests/regression/issue_692/oneof.proto
vendored
Normal 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
|
||||
}
|
||||
|
||||
|
9
third_party/nanopb/tests/regression/issue_692/other.proto
vendored
Normal file
9
third_party/nanopb/tests/regression/issue_692/other.proto
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto3";
|
||||
|
||||
message SecondOneof {
|
||||
repeated int32 foo = 1;
|
||||
}
|
||||
|
||||
message AnotherList {
|
||||
repeated int32 bar = 1;
|
||||
}
|
7
third_party/nanopb/tests/regression/issue_692/test.c
vendored
Normal file
7
third_party/nanopb/tests/regression/issue_692/test.c
vendored
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue