mirror of
https://github.com/google/pebble.git
synced 2025-12-02 20:23:07 -05:00
Import of the watch repository from Pebble
This commit is contained in:
18
third_party/nanopb/tests/regression/issue_172/SConscript
vendored
Normal file
18
third_party/nanopb/tests/regression/issue_172/SConscript
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Verify that _size define is generated for messages that have
|
||||
# includes from another directory.
|
||||
|
||||
Import('env')
|
||||
|
||||
incpath = env.Clone()
|
||||
incpath.Append(PROTOCPATH="#regression/issue_172/submessage")
|
||||
incpath.Append(CPPPATH="$BUILD/regression/issue_172/submessage")
|
||||
incpath.Append(CPPPATH="$BUILD/regression/issue_172/")
|
||||
incpath.NanopbProto('test')
|
||||
incpath.NanopbProto(['submessage/submessage', 'submessage/submessage.options'])
|
||||
|
||||
p = incpath.Program(["msg_size.c",
|
||||
"test.pb.c",
|
||||
"submessage/submessage.pb.c",
|
||||
'$COMMON/pb_common.o'])
|
||||
|
||||
|
||||
9
third_party/nanopb/tests/regression/issue_172/msg_size.c
vendored
Normal file
9
third_party/nanopb/tests/regression/issue_172/msg_size.c
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "test.pb.h"
|
||||
|
||||
PB_STATIC_ASSERT(testmessage_size >= 1+1+1+1+16, TESTMESSAGE_SIZE_IS_WRONG)
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
1
third_party/nanopb/tests/regression/issue_172/submessage/submessage.options
vendored
Normal file
1
third_party/nanopb/tests/regression/issue_172/submessage/submessage.options
vendored
Normal file
@@ -0,0 +1 @@
|
||||
submessage.data max_size: 16
|
||||
4
third_party/nanopb/tests/regression/issue_172/submessage/submessage.proto
vendored
Normal file
4
third_party/nanopb/tests/regression/issue_172/submessage/submessage.proto
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
syntax = "proto2";
|
||||
message submessage {
|
||||
required bytes data = 1;
|
||||
}
|
||||
6
third_party/nanopb/tests/regression/issue_172/test.proto
vendored
Normal file
6
third_party/nanopb/tests/regression/issue_172/test.proto
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
syntax = "proto2";
|
||||
import "submessage.proto";
|
||||
|
||||
message testmessage {
|
||||
optional submessage sub = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user