mirror of
https://github.com/google/pebble.git
synced 2025-08-16 19:36:33 -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
10
third_party/nanopb/tests/regression/issue_610/DataPacket.proto
vendored
Normal file
10
third_party/nanopb/tests/regression/issue_610/DataPacket.proto
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "LogMessage.proto";
|
||||
|
||||
message DataPacket {
|
||||
oneof packet {
|
||||
LogMessage log_message = 1;
|
||||
}
|
||||
}
|
||||
|
5
third_party/nanopb/tests/regression/issue_610/LogMessage.proto
vendored
Normal file
5
third_party/nanopb/tests/regression/issue_610/LogMessage.proto
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
syntax = "proto3";
|
||||
|
||||
message LogMessage {
|
||||
string msg = 1;
|
||||
}
|
31
third_party/nanopb/tests/regression/issue_610/SConscript
vendored
Normal file
31
third_party/nanopb/tests/regression/issue_610/SConscript
vendored
Normal 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"])
|
2
third_party/nanopb/tests/regression/issue_610/first.expected
vendored
Normal file
2
third_party/nanopb/tests/regression/issue_610/first.expected
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
define First_size\s*4
|
||||
|
11
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first.proto
vendored
Normal file
11
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first.proto
vendored
Normal 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;
|
||||
}
|
||||
}
|
13
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a.proto
vendored
Normal file
13
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a.proto
vendored
Normal 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;
|
||||
}
|
||||
}
|
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/aa.proto
vendored
Normal file
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/aa.proto
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
syntax="proto3";
|
||||
|
||||
package first.a;
|
||||
|
||||
message A {}
|
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/ab.proto
vendored
Normal file
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/ab.proto
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
syntax="proto3";
|
||||
|
||||
package first.a;
|
||||
|
||||
message B {}
|
11
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b.proto
vendored
Normal file
11
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b.proto
vendored
Normal 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;
|
||||
}
|
||||
}
|
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b/ba.proto
vendored
Normal file
5
third_party/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b/ba.proto
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
syntax="proto3";
|
||||
|
||||
package first.b;
|
||||
|
||||
message A {}
|
Loading…
Add table
Add a link
Reference in a new issue