Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
9cd53394
Commit
9cd53394
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Fix a few valgrind warnings in the tests
parent
499f680f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_axolotl.cpp
+3
-1
3 additions, 1 deletion
tests/test_axolotl.cpp
with
3 additions
and
1 deletion
tests/test_axolotl.cpp
+
3
−
1
View file @
9cd53394
...
...
@@ -57,7 +57,7 @@ std::uint8_t b_ot_keys[::axolotl_account_one_time_keys_length(b_account)];
std
::
uint8_t
a_session_buffer
[
::
axolotl_session_size
()];
::
AxolotlSession
*
a_session
=
::
axolotl_session
(
a_session_buffer
);
std
::
uint8_t
a_rand
[
::
axolotl_create_outbound_session_random_length
(
a_session
)];
std
::
memset
(
b
_rand
om
,
6
,
sizeof
(
a_rand
));
/* http://xkcd.com/221/ */
std
::
memset
(
a
_rand
,
6
,
sizeof
(
a_rand
));
/* http://xkcd.com/221/ */
assert_not_equals
(
std
::
size_t
(
-
1
),
::
axolotl_create_outbound_session
(
a_session
,
a_account
,
b_id_keys
+
14
,
43
,
...
...
@@ -68,6 +68,7 @@ assert_not_equals(std::size_t(-1), ::axolotl_create_outbound_session(
std
::
uint8_t
plaintext
[]
=
"Hello, World"
;
std
::
uint8_t
message_1
[
::
axolotl_encrypt_message_length
(
a_session
,
12
)];
std
::
uint8_t
a_message_random
[
::
axolotl_encrypt_random_length
(
a_session
)];
std
::
memset
(
a_message_random
,
1
,
sizeof
(
a_message_random
));
/* http://xkcd.com/221/ */
assert_equals
(
std
::
size_t
(
0
),
::
axolotl_encrypt_message_type
(
a_session
));
assert_not_equals
(
std
::
size_t
(
-
1
),
::
axolotl_encrypt
(
a_session
,
...
...
@@ -100,6 +101,7 @@ assert_equals(plaintext, plaintext_1, 12);
std
::
uint8_t
message_2
[
::
axolotl_encrypt_message_length
(
b_session
,
12
)];
std
::
uint8_t
b_message_random
[
::
axolotl_encrypt_random_length
(
b_session
)];
std
::
memset
(
b_message_random
,
2
,
sizeof
(
b_message_random
));
/* http://xkcd.com/221/ */
assert_equals
(
std
::
size_t
(
1
),
::
axolotl_encrypt_message_type
(
b_session
));
assert_not_equals
(
std
::
size_t
(
-
1
),
::
axolotl_encrypt
(
b_session
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment