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(sas): Add mutation tests #140

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

Johennes
Copy link
Contributor

This fixes the following:

MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [0; 7] in 0.8s build + 3.4s test
MISSED   src/sas.rs:152:9: replace SasBytes::emoji_indices -> [u8; 7] with [1; 7] in 0.9s build + 3.4s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 0) in 0.8s build + 3.1s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 0, 1) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 0) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (0, 1, 1) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 0) in 0.8s build + 3.7s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 0, 1) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 0) in 0.8s build + 3.0s test
MISSED   src/sas.rs:160:9: replace SasBytes::decimals -> (u16, u16, u16) with (1, 1, 1) in 0.8s build + 3.7s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[0; 6] in 0.8s build + 2.9s test
MISSED   src/sas.rs:166:9: replace SasBytes::as_bytes -> &[u8; 6] with &[1; 6] in 0.8s build + 2.9s test
MISSED   src/sas.rs:204:35: replace | with ^ in SasBytes::bytes_to_decimal in 0.9s build + 3.0s test
MISSED   src/sas.rs:205:45: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:205:61: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 2.9s test
MISSED   src/sas.rs:206:44: replace | with ^ in SasBytes::bytes_to_decimal in 0.8s build + 3.7s test
MISSED   src/sas.rs:384:9: replace EstablishedSas::verify_mac -> Result<(), SasError> with Ok(()) in 0.9s build + 3.8s test

While at it, I also removed the Result return values in the same file as recommended on one of my earlier PRs.

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 88.52%. Comparing base (4e51951) to head (62ab1a0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #140   +/-   ##
=======================================
  Coverage   88.52%   88.52%           
=======================================
  Files          32       32           
  Lines        1786     1786           
=======================================
  Hits         1581     1581           
  Misses        205      205           

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

Copy link
Collaborator

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good.

@poljar poljar merged commit 9841c0b 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