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(types): Add mutation tests for ed25519 #136

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

Johennes
Copy link
Contributor

This fixes:

MISSED   src/types/ed25519.rs:111:24: replace != with == in <impl Deserialize for ExpandedSecretKey>::deserialize in 0.8s build + 3.1s test
MISSED   src/types/ed25519.rs:153:9: replace Ed25519Keypair::expanded_secret_key -> Box<[u8; 64]> with Box::new([0; 64]) in 1.0s build + 3.7s test
MISSED   src/types/ed25519.rs:153:9: replace Ed25519Keypair::expanded_secret_key -> Box<[u8; 64]> with Box::new([1; 64]) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:209:9: replace Ed25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([0; 32]) in 0.8s build + 2.8s test
MISSED   src/types/ed25519.rs:209:9: replace Ed25519SecretKey::to_bytes -> Box<[u8; 32]> with Box::new([1; 32]) in 0.9s build + 3.0s test
MISSED   src/types/ed25519.rs:214:9: replace Ed25519SecretKey::from_slice -> Self with Default::default() in 0.8s build + 2.8s test
MISSED   src/types/ed25519.rs:225:9: replace Ed25519SecretKey::to_base64 -> String with "xyzzy".into() in 0.9s build + 3.5s test
MISSED   src/types/ed25519.rs:225:9: replace Ed25519SecretKey::to_base64 -> String with String::new() in 0.9s build + 3.4s test
MISSED   src/types/ed25519.rs:235:24: replace != with == in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:47: replace && with || in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:62: replace != with == in Ed25519SecretKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:235:9: replace Ed25519SecretKey::from_base64 -> Result<Self, crate::KeyError> with Ok(Default::default()) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:338:24: replace != with == in Ed25519PublicKey::from_base64 in 1.0s build + 3.0s test
MISSED   src/types/ed25519.rs:338:47: replace && with || in Ed25519PublicKey::from_base64 in 0.8s build + 2.9s test
MISSED   src/types/ed25519.rs:338:62: replace != with == in Ed25519PublicKey::from_base64 in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:385:9: replace Ed25519PublicKey::verify -> Result<(), SignatureError> with Ok(()) in 0.9s build + 3.7s test
MISSED   src/types/ed25519.rs:404:9: replace <impl Display for Ed25519PublicKey>::fmt -> std::fmt::Result with Ok(Default::default()) in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:448:9: replace <impl Display for Ed25519Signature>::fmt -> std::fmt::Result with Ok(Default::default()) in 0.8s build + 3.0s test
MISSED   src/types/ed25519.rs:70:9: replace ExpandedSecretKey::as_bytes -> &[u8; 64] with &[0; 64] in 0.8s build + 3.3s test
MISSED   src/types/ed25519.rs:70:9: replace ExpandedSecretKey::as_bytes -> &[u8; 64] with &[1; 64] in 0.8s build + 3.2s test

Relates to: #78

@Johennes Johennes force-pushed the johannes/ed25519-mutation-tests branch from 9f5b73c to fa9249c Compare March 20, 2024 19:10
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.

That's a nice chunk of tests. Thanks.

@poljar poljar merged commit 0c75746 into matrix-org:main Mar 21, 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.

2 participants