aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/nanopb/tests/regression/issue_195
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nanopb/tests/regression/issue_195')
-rw-r--r--third_party/nanopb/tests/regression/issue_195/SConscript10
-rw-r--r--third_party/nanopb/tests/regression/issue_195/test.expected1
-rw-r--r--third_party/nanopb/tests/regression/issue_195/test.proto8
3 files changed, 19 insertions, 0 deletions
diff --git a/third_party/nanopb/tests/regression/issue_195/SConscript b/third_party/nanopb/tests/regression/issue_195/SConscript
new file mode 100644
index 0000000000..78326d325e
--- /dev/null
+++ b/third_party/nanopb/tests/regression/issue_195/SConscript
@@ -0,0 +1,10 @@
+# Regression test for Issue 195: Message size not calculated if a submessage includes
+# bytes. Basically a non-working #define being generated.
+
+Import("env")
+
+env.NanopbProto(["test"])
+env.Object('test.pb.c')
+
+env.Match(['test.pb.h', 'test.expected'])
+
diff --git a/third_party/nanopb/tests/regression/issue_195/test.expected b/third_party/nanopb/tests/regression/issue_195/test.expected
new file mode 100644
index 0000000000..83ea7ab869
--- /dev/null
+++ b/third_party/nanopb/tests/regression/issue_195/test.expected
@@ -0,0 +1 @@
+/\* TestMessage_size depends
diff --git a/third_party/nanopb/tests/regression/issue_195/test.proto b/third_party/nanopb/tests/regression/issue_195/test.proto
new file mode 100644
index 0000000000..7a77d69dc5
--- /dev/null
+++ b/third_party/nanopb/tests/regression/issue_195/test.proto
@@ -0,0 +1,8 @@
+message TestMessage {
+ required uint32 id = 1;
+ required bytes payload = 2;
+}
+message EncapsulatedMessage {
+ required uint32 id = 1;
+ required TestMessage test = 2;
+}