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,10 @@
syntax = "proto3";
import "LogMessage.proto";
message DataPacket {
oneof packet {
LogMessage log_message = 1;
}
}

View file

@ -0,0 +1,5 @@
syntax = "proto3";
message LogMessage {
string msg = 1;
}

View file

@ -0,0 +1,31 @@
# Regression test for #610:
# Error "'dict_values' object does not support indexing" while compiling .proto files
Import("env")
# First the simple case with two files
env.NanopbProto("LogMessage.proto")
env.NanopbProto(["DataPacket.proto", "LogMessage.proto"])
env.Object("LogMessage.pb.c")
env.Object("DataPacket.pb.c")
# Then the complex hierarchy case
all_files = [
'nanopb_generator_bug/first/a/aa.proto',
'nanopb_generator_bug/first/a/ab.proto',
'nanopb_generator_bug/first/a.proto',
'nanopb_generator_bug/first/b/ba.proto',
'nanopb_generator_bug/first/b.proto',
'nanopb_generator_bug/first.proto'
]
env2 = env.Clone()
env2.Append(CPPPATH = "$BUILD/regression/issue_610")
for f in all_files:
env2.NanopbProto([f] + all_files)
for f in all_files:
env2.Object(f.replace('.proto', '.pb.c'))
env2.Match(["nanopb_generator_bug/first.pb.h", "first.expected"])

View file

@ -0,0 +1,2 @@
define First_size\s*4

View file

@ -0,0 +1,11 @@
syntax="proto3";
import "nanopb_generator_bug/first/a.proto";
import "nanopb_generator_bug/first/b.proto";
message First {
oneof oneof_first {
first.A obj_a = 1;
first.B obj_b = 2;
}
}

View file

@ -0,0 +1,13 @@
syntax="proto3";
package first;
import "nanopb_generator_bug/first/a/aa.proto";
import "nanopb_generator_bug/first/a/ab.proto";
message A {
oneof oneof_a {
a.A obj_a = 1;
a.B obj_b = 2;
}
}

View file

@ -0,0 +1,5 @@
syntax="proto3";
package first.a;
message A {}

View file

@ -0,0 +1,5 @@
syntax="proto3";
package first.a;
message B {}

View file

@ -0,0 +1,11 @@
syntax="proto3";
package first;
import "nanopb_generator_bug/first/b/ba.proto";
message B {
oneof oneof_b {
b.A obj_a = 1;
}
}

View file

@ -0,0 +1,5 @@
syntax="proto3";
package first.b;
message A {}