-
Notifications
You must be signed in to change notification settings - Fork 33
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 mutation tests for account #138
test(olm): Add mutation tests for account #138
Conversation
@@ -690,6 +694,49 @@ mod test { | |||
|
|||
const PICKLE_KEY: [u8; 32] = [0u8; 32]; | |||
|
|||
#[test] | |||
fn max_number_of_one_time_keys_matches_global_constant() { | |||
assert_eq!(Account::new().max_number_of_one_time_keys(), PUBLIC_MAX_ONE_TIME_KEYS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is slightly silly but I'm not sure how else to fix this miss:
MISSED src/olm/account/mod.rs:152:9: replace Account::max_number_of_one_time_keys -> usize with 0 in 0.8s build + 2.9s test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's fine, it's a simple getter, those will always require kinda dumb tests.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #138 +/- ##
==========================================
+ Coverage 87.68% 88.35% +0.67%
==========================================
Files 32 32
Lines 1786 1786
==========================================
+ Hits 1566 1578 +12
+ Misses 220 208 -12 ☔ View full report in Codecov by Sentry. |
Relates to: matrix-org#78 Signed-off-by: Johannes Marbach <[email protected]>
cda3528
to
9aa9e47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looking good.
@@ -690,6 +694,49 @@ mod test { | |||
|
|||
const PICKLE_KEY: [u8; 32] = [0u8; 32]; | |||
|
|||
#[test] | |||
fn max_number_of_one_time_keys_matches_global_constant() { | |||
assert_eq!(Account::new().max_number_of_one_time_keys(), PUBLIC_MAX_ONE_TIME_KEYS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's fine, it's a simple getter, those will always require kinda dumb tests.
This fixes:
Relates to: #78