-
Notifications
You must be signed in to change notification settings - Fork 40
is and it modifiers have to be first class citizens #75
Copy link
Copy link
Closed
Milestone
Description
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 viaarg => valueis equal_to X - not
eq - (not)
ltis less_than X - (not)
leqis less_or_equal_than X - (not)
gtis greater_than X - (not)
geqis greater_or_equal_than X - (not)
type_of- do we need that? - Add
it (not) matches_regex ...#80
Numerical matchers
- (not)
close_tois almost_equal_to X
Filesystem matchers
- (not)
path_existsis existing_path - (not)
file_existsis file - (not)
dir_existsis 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
- (not)
containsit contains X - (not)
contains_exactly-matches vec![1, 2, 3]&matches [1, 2, 3] - (not)
contains_in_orderit contains_in_order [X, Y, Z] - Add
is (not) len ...#81 - Add
is (not) empty#82
Compound matchers
- (not)
all - (not)
any
Misc
-
is(bool)- supported viaarg => value -
anything- useless intest_casecontext
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels