Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-21 14:41:20 +0400
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-21 14:41:20 +0400
commitcd9004089fd4ae42cc68fd15f085f42c48494cb4 (patch)
treef0b690d8866e2f4ae84a0f5cdf9a0a02d3755ec7 /tests/alltypes/decode_alltypes.c
parentee5b12c537115b113ce01708d4a86a4062cdb182 (diff)
Add test for extreme integer values (INT32_MAX etc.) in AllTypes.
Diffstat (limited to 'tests/alltypes/decode_alltypes.c')
-rw-r--r--tests/alltypes/decode_alltypes.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/alltypes/decode_alltypes.c b/tests/alltypes/decode_alltypes.c
index ee2e115..db72bb9 100644
--- a/tests/alltypes/decode_alltypes.c
+++ b/tests/alltypes/decode_alltypes.c
@@ -170,6 +170,17 @@ bool check_alltypes(pb_istream_t *stream, int mode)
TEST(alltypes.has_opt_emptymsg == true);
}
+ TEST(alltypes.req_limits.int32_min == INT32_MIN);
+ TEST(alltypes.req_limits.int32_max == INT32_MAX);
+ TEST(alltypes.req_limits.uint32_min == 0);
+ TEST(alltypes.req_limits.uint32_max == UINT32_MAX);
+ TEST(alltypes.req_limits.int64_min == INT64_MIN);
+ TEST(alltypes.req_limits.int64_max == INT64_MAX);
+ TEST(alltypes.req_limits.uint64_min == 0);
+ TEST(alltypes.req_limits.uint64_max == UINT64_MAX);
+ TEST(alltypes.req_limits.enum_min == HugeEnum_Negative);
+ TEST(alltypes.req_limits.enum_max == HugeEnum_Positive);
+
TEST(alltypes.end == 1099);
return true;