orion
orion copied to clipboard
Add tests for trait implementations on newtypes
To check that all newtypes (SecretKey
s, Poly1305
, etc.) implement the correct traits, new testing functions are needed.
For example fn test_traits_secret_key<Secret: Debug + Drop + PartialEq>() {}
could be used to check that a secret key implements the needed traits in a test like so:
fn test_traits_secret_key<Secret: Debug + Drop + PartialEq>() {}
#[test]
fn test_implemented_traits() {
test_traits_secret_key<hmac::SecretKey>();
}