Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(olm): Add remaining mutation tests #139

Merged

Conversation

Johennes
Copy link
Contributor

This fixes the remaining mutation tests under src/olm:

MISSED   src/olm/account/one_time_keys.rs:45:42: replace * with + in 0.8s build + 3.2s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(Vec::new()) in 0.8s build + 3.2s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![0]) in 0.8s build + 2.9s test
MISSED   src/olm/messages/mod.rs:99:9: replace OlmMessage::message -> &[u8] with Vec::leak(vec![1]) in 0.8s build + 3.1s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 0 in 0.8s build + 3.0s test
MISSED   src/olm/session/chain_key.rs:112:9: replace ChainKey::index -> u64 with 1 in 0.8s build + 2.9s test
MISSED   src/olm/session/mod.rs:226:9: replace Session::has_received_message -> bool with false in 0.8s build + 3.1s test
MISSED   src/olm/session/mod.rs:256:9: replace Session::session_config -> SessionConfig with Default::default() in 0.7s build + 3.0s test
MISSED   src/olm/session/mod.rs:485:5: replace default_config -> SessionConfig with Default::default() in 0.9s build + 3.8s test
MISSED   src/olm/session/mod.rs:98:9: replace ChainStore::is_empty -> bool with true in 1.1s build + 3.2s test
MISSED   src/olm/session/ratchet.rs:79:9: replace <impl From for RatchetKey>::from -> Self with Default::default() in 0.8s build + 3.1s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 0 in 0.9s build + 3.0s test
MISSED   src/olm/session_config.rs:33:9: replace SessionConfig::version -> u8 with 1 in 0.8s build + 3.5s tes
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 0 in 0.8s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:71:9: replace RemoteChainKey::chain_index -> u64 with 1 in 1.0s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:80:9: replace RemoteChainKey::advance with () in 0.8s build + 23.0s test
TIMEOUT  src/olm/session/chain_key.rs:82:20: replace += with *= in RemoteChainKey::advance in 0.8s build + 23.0s test

Relates to: #78

Relates to: matrix-org#78

Signed-off-by: Johannes Marbach <[email protected]>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.41%. Comparing base (4e51951) to head (dc6d48b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
+ Coverage   88.52%   89.41%   +0.89%     
==========================================
  Files          32       32              
  Lines        1786     1786              
==========================================
+ Hits         1581     1597      +16     
+ Misses        205      189      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@poljar poljar merged commit 7d51bd6 into matrix-org:main Apr 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants