summaryrefslogtreecommitdiffstats
path: root/tests/options
diff options
context:
space:
mode:
Diffstat (limited to 'tests/options')
-rw-r--r--tests/options/SConscript5
-rw-r--r--tests/options/proto3_options.expected4
-rw-r--r--tests/options/proto3_options.proto11
3 files changed, 19 insertions, 1 deletions
diff --git a/tests/options/SConscript b/tests/options/SConscript
index 89a00fa5..215e3bd0 100644
--- a/tests/options/SConscript
+++ b/tests/options/SConscript
@@ -4,6 +4,9 @@ Import("env")
env.NanopbProto("options")
env.Object('options.pb.c')
-
env.Match(['options.pb.h', 'options.expected'])
+env.NanopbProto("proto3_options")
+env.Object('proto3_options.pb.c')
+env.Match(['proto3_options.pb.h', 'proto3_options.expected'])
+
diff --git a/tests/options/proto3_options.expected b/tests/options/proto3_options.expected
new file mode 100644
index 00000000..cc2f29c0
--- /dev/null
+++ b/tests/options/proto3_options.expected
@@ -0,0 +1,4 @@
+! bool has_proto3_default
+bool has_proto3_off
+! bool has_proto3_on
+
diff --git a/tests/options/proto3_options.proto b/tests/options/proto3_options.proto
new file mode 100644
index 00000000..1017f046
--- /dev/null
+++ b/tests/options/proto3_options.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+import "nanopb.proto";
+
+message Message1
+{
+ int32 proto3_default = 1;
+ int32 proto3_off = 2 [(nanopb).proto3 = false];
+ int32 proto3_on = 3 [(nanopb).proto3 = true];
+}
+