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

Better tools for testing Ord and VersionSet #113

Open
Eh2406 opened this issue May 27, 2022 · 0 comments
Open

Better tools for testing Ord and VersionSet #113

Eh2406 opened this issue May 27, 2022 · 0 comments

Comments

@Eh2406
Copy link
Member

Eh2406 commented May 27, 2022

Mostly a follow-up to this comment:
#108 (comment)

But we should provide some way for a user to run "all the tests we can think of" on their types. Not only that we should be using those tests on our types. And they should be documented in the user guide.

May be functions like tests_on_a_version<VS: VersionSet>(v: VS::V) , tests_on_two_versions<VS: VersionSet>(v1: VS::V, v2: VS::V), tests_on_a_set<VS: VersionSet>(vs: VS), etc. that panic if they find a property that doesn't hold. On the other hand that doesn't give a good error message about which property didn't hold.

So maybe a set of functions not_contained_in_empty<VS: VersionSet>(v: VS::V), contained_in_full<VS: VersionSet>(v: VS::V), etc. that panic if a particular property is violated. But then it can be annoying for our users to make one test per property. Maybe we can solve this with a macro somehow?

@Eh2406 Eh2406 added this to the v0.3 milestone May 27, 2022
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