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

Use test_ or check_ prefix on functions that verify a result #15

Open
nlsandler opened this issue Feb 7, 2024 · 0 comments
Open

Use test_ or check_ prefix on functions that verify a result #15

nlsandler opened this issue Feb 7, 2024 · 0 comments

Comments

@nlsandler
Copy link
Owner

Taking @stephenrkell's feedback in #5 (review)

E.g. rename

int add_large(void) {
    // x = 5l
    x = x + 4294967290l; // this constant is 2^32 - 6
    return (x == 4294967295l);
}

to test_add_large so it's clear the function doesn't just add numbers, it also verifies the result.

In general, use test_ prefix for standalone tests, check_ to validate input from elsewhere

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

No branches or pull requests

1 participant