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

is and it modifiers have to be first class citizens #75

Closed
17 of 27 tasks
luke-biel opened this issue Dec 18, 2021 · 1 comment
Closed
17 of 27 tasks

is and it modifiers have to be first class citizens #75

luke-biel opened this issue Dec 18, 2021 · 1 comment
Milestone

Comments

@luke-biel
Copy link
Collaborator

luke-biel commented Dec 18, 2021

Existence of hamcrest_assertions is usefull, but requires addition of an extra crate. It would be beneficial if user could write test_case(args => is ...) without extra work.

For first release, for all assertions provided by hamcrest2 lib we should either cover it with our own syntax or mention replacement/why it's not implemented.

Later we'll be able to expand functionality of is|it on our own.

General matchers

  • eq - already covered via arg => value is equal_to X
  • not eq
  • (not) lt is less_than X
  • (not) leq is less_or_equal_than X
  • (not) gt is greater_than X
  • (not) geq is greater_or_equal_than X
  • (not) type_of - do we need that?
  • Add it (not) matches_regex ... #80

Numerical matchers

  • (not) close_to is almost_equal_to X

Filesystem matchers

  • (not) path_exists is existing_path
  • (not) file_exists is file
  • (not) dir_exists is dir

Option and Result

  • has - matches Ok(5) can be used
  • negated has - matches Ok(v) if v != 5
  • (not) ok - matches Ok(_) & matches Err(_)
  • (not) err - same
  • (not) some - same
  • (not) none - same

Collection matchers

Compound matchers

  • (not) all
  • (not) any

Misc

  • is(bool) - supported via arg => value
  • anything - useless in test_case context
@luke-biel luke-biel added this to the 2.0.0 milestone Dec 18, 2021
@luke-biel luke-biel mentioned this issue Dec 18, 2021
7 tasks
@luke-biel
Copy link
Collaborator Author

All cases that have to be added (preferably in 2.1 release) were converted into separate issues. Rest seem to be unimportant, unless someone turns up with use case.
Closing this. In case something compes up, let's create separate issue and not block 2.0 release.

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