Check the message index in the tests

This commit is contained in:
Mark Haines 2016-10-20 11:51:56 +01:00
parent 3091dc2b1d
commit 9a8d2d15d9

View file

@ -166,6 +166,7 @@ int main() {
plaintext_buf, size, &message_index); plaintext_buf, size, &message_index);
assert_equals(plaintext_length, res); assert_equals(plaintext_length, res);
assert_equals(plaintext, plaintext_buf, res); assert_equals(plaintext, plaintext_buf, res);
assert_equals(message_index, uint32_t(0));
} }
{ {
@ -213,6 +214,7 @@ int main() {
res = olm_group_decrypt( res = olm_group_decrypt(
inbound_session, msgcopy, msglen, plaintext_buf, size, &message_index inbound_session, msgcopy, msglen, plaintext_buf, size, &message_index
); );
assert_equals(message_index, uint32_t(0));
assert_equals(plaintext_length, res); assert_equals(plaintext_length, res);
assert_equals(plaintext, plaintext_buf, res); assert_equals(plaintext, plaintext_buf, res);