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

Add tests for trait implementations on newtypes #120

Open
brycx opened this issue Feb 25, 2020 · 0 comments
Open

Add tests for trait implementations on newtypes #120

brycx opened this issue Feb 25, 2020 · 0 comments
Assignees
Labels
testing All testing, except for fuzzing related

Comments

@brycx
Copy link
Member

brycx commented Feb 25, 2020

To check that all newtypes (SecretKeys, 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>();
}
@brycx brycx added good first issue Good for newcomers testing All testing, except for fuzzing related labels Feb 25, 2020
@brycx brycx removed the good first issue Good for newcomers label Feb 2, 2022
@brycx brycx self-assigned this Feb 2, 2022
@brycx brycx added this to the 0.17.2 milestone Feb 2, 2022
@brycx brycx modified the milestones: 0.17.2, 0.17.3 Aug 16, 2022
@brycx brycx modified the milestones: 0.17.3, 0.17.4 Dec 7, 2022
@brycx brycx removed this from the 0.17.4 milestone Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing All testing, except for fuzzing related
Projects
None yet
Development

No branches or pull requests

1 participant