aboutsummaryrefslogtreecommitdiff
path: root/tests/test_olm.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-07-16 11:45:20 +0100
committerMark Haines <mark.haines@matrix.org>2015-07-16 11:45:20 +0100
commit3468886e27c54690cc484662ea656f021997a9c7 (patch)
tree0e0c059c7963505520304c8c1fd7cc851f1ee6ca /tests/test_olm.cpp
parent89d9b972a6d629648d18f4227a08596c65c3894d (diff)
Add method getting a session id. Update the python and javascript bindings
Diffstat (limited to 'tests/test_olm.cpp')
-rw-r--r--tests/test_olm.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_olm.cpp b/tests/test_olm.cpp
index 551b3cd..fbc14cf 100644
--- a/tests/test_olm.cpp
+++ b/tests/test_olm.cpp
@@ -216,6 +216,19 @@ assert_equals(std::size_t(-1), ::olm_decrypt(
plaintext_2, sizeof(plaintext_2)
));
+std::uint8_t a_session_id[::olm_session_id_length(a_session)];
+assert_not_equals(std::size_t(-1), ::olm_session_id(
+ a_session, a_session_id, sizeof(a_session_id)
+));
+
+std::uint8_t b_session_id[::olm_session_id_length(b_session)];
+assert_not_equals(std::size_t(-1), ::olm_session_id(
+ b_session, b_session_id, sizeof(b_session_id)
+));
+
+assert_equals(sizeof(a_session_id), sizeof(b_session_id));
+assert_equals(a_session_id, b_session_id, sizeof(b_session_id));
+
}
{ /** More messages test */