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

Checks for sequences #112

Open
jackfirth opened this issue Dec 13, 2019 · 0 comments
Open

Checks for sequences #112

jackfirth opened this issue Dec 13, 2019 · 0 comments

Comments

@jackfirth
Copy link
Sponsor Collaborator

It would be nice to have some custom checks that simplify assertions made on sequences.

  • (check-contains? seq expected ...) For each expected, assert that seq contains at least one value that is equal to the expected. Maybe include a keyword argument to enforce order.
  • (check-contains-exactly? seq expected ...) Like check-contains?, but if seq has any extra values then the assertion is failed.
  • (check-has-size? seq expected) Same as (check-equal? (sequence-length seq) expected).

This would also help teach people that the "actual" value goes on the left, and the "expected" value(s) go on the right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant