diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-28 15:38:05 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-28 15:38:05 +0000 |
commit | d7863b7424b1be5da33e9d632365f3e2c0538461 (patch) | |
tree | 4c00e757f839c93785dcb92f75adc49c2a8996ea /tests | |
parent | b9ca72e6af6a3a74a5a1f581540e5004ab72ea2c (diff) |
iter
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@948 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_decode1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_decode1.c b/tests/test_decode1.c index 4e0d7117..a507b0dc 100644 --- a/tests/test_decode1.c +++ b/tests/test_decode1.c @@ -37,8 +37,8 @@ const pb_field_t Person_PhoneNumber_fields[] = { membersize(Person_PhoneNumber, number), 0, 0}, {2, PB_HTYPE_OPTIONAL | PB_LTYPE_VARINT, - offsetof(Person_PhoneNumber, type), - offsetof(Person_PhoneNumber, has_type), + offsetof(Person_PhoneNumber, type) - offsetof(Person_PhoneNumber, number), + (int)offsetof(Person_PhoneNumber, has_type) - (int)offsetof(Person_PhoneNumber, type), membersize(Person_PhoneNumber, type), 0, &Person_PhoneType_type_default}, @@ -51,17 +51,17 @@ const pb_field_t Person_fields[] = { membersize(Person, name), 0, 0}, {2, PB_HTYPE_REQUIRED | PB_LTYPE_VARINT, - offsetof(Person, id), 0, + offsetof(Person, id) - offsetof(Person, name), 0, membersize(Person, id), 0, 0}, {3, PB_HTYPE_OPTIONAL | PB_LTYPE_STRING, - offsetof(Person, email), - offsetof(Person, has_email), + offsetof(Person, email) - offsetof(Person, id), + (int)offsetof(Person, has_email) - (int)offsetof(Person, email), membersize(Person, email), 0, 0}, {4, PB_HTYPE_ARRAY | PB_LTYPE_SUBMESSAGE, - offsetof(Person, phone), - offsetof(Person, phone_size), + offsetof(Person, phone) - offsetof(Person, email), + (int)offsetof(Person, phone_size) - (int)offsetof(Person, phone), membersize(Person, phone[0]), membersize(Person, phone) / membersize(Person, phone[0]), Person_PhoneNumber_fields}, |