aboutsummaryrefslogtreecommitdiffstats
path: root/tests/alltypes.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-07-31 19:10:33 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-07-31 19:10:33 +0300
commit5703ad0c55634e91157a965bbfa089a4396f3cb5 (patch)
tree9a056f8837b55e202f2907f56960ef1cded8fbe7 /tests/alltypes.proto
parent0a5b6852ec34a9b954503e707f5fe71df37638ce (diff)
Extend 'alltypes' testcase to cover repeated fields.
Diffstat (limited to 'tests/alltypes.proto')
-rw-r--r--tests/alltypes.proto24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/alltypes.proto b/tests/alltypes.proto
index 744a0fc..edaaa62 100644
--- a/tests/alltypes.proto
+++ b/tests/alltypes.proto
@@ -6,6 +6,7 @@ message SubMessage {
}
enum MyEnum {
+ Zero = 0;
First = 1;
Second = 2;
Truth = 42;
@@ -33,6 +34,29 @@ message AllTypes {
required SubMessage req_submsg = 16;
required MyEnum req_enum = 17;
+
+ repeated int32 rep_int32 = 21 [(nanopb).max_count = 5];
+ repeated int64 rep_int64 = 22 [(nanopb).max_count = 5];
+ repeated uint32 rep_uint32 = 23 [(nanopb).max_count = 5];
+ repeated uint64 rep_uint64 = 24 [(nanopb).max_count = 5];
+ repeated sint32 rep_sint32 = 25 [(nanopb).max_count = 5];
+ repeated sint64 rep_sint64 = 26 [(nanopb).max_count = 5];
+ repeated bool rep_bool = 27 [(nanopb).max_count = 5];
+
+ repeated fixed32 rep_fixed32 = 28 [(nanopb).max_count = 5];
+ repeated sfixed32 rep_sfixed32= 29 [(nanopb).max_count = 5];
+ repeated float rep_float = 30 [(nanopb).max_count = 5];
+
+ repeated fixed64 rep_fixed64 = 31 [(nanopb).max_count = 5];
+ repeated sfixed64 rep_sfixed64= 32 [(nanopb).max_count = 5];
+ repeated double rep_double = 33 [(nanopb).max_count = 5];
+
+ repeated string rep_string = 34 [(nanopb).max_size = 16, (nanopb).max_count = 5];
+ repeated bytes rep_bytes = 35 [(nanopb).max_size = 16, (nanopb).max_count = 5];
+ repeated SubMessage rep_submsg = 36 [(nanopb).max_count = 5];
+ repeated MyEnum rep_enum = 37 [(nanopb).max_count = 5];
+
+
// Just to make sure that the size of the fields has been calculated
// properly, i.e. otherwise a bug in last field might not be detected.
required int32 end = 99;