1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#![crate_name = "hamcrest"]
#![crate_type = "lib"]
extern crate num;
extern crate regex;
pub use prelude::*;
#[macro_export]
macro_rules! assert_that {
($actual:expr, $matcher:expr) => ({
let m = $matcher;
match m.matches($actual) {
Ok(_) => {},
Err(mismatch) => {
panic!("\nExpected: {}\n but: {}", m, mismatch);
}
}
}
);
}
pub mod core;
pub mod matchers;
pub mod prelude {
#[allow(deprecated)]
pub use core::assert_that;
pub use core::Matcher as HamcrestMatcher;
pub use matchers::close_to::close_to;
pub use matchers::compared_to::less_than;
pub use matchers::compared_to::less_than_or_equal_to;
pub use matchers::compared_to::greater_than;
pub use matchers::compared_to::greater_than_or_equal_to;
pub use matchers::equal_to::equal_to;
pub use matchers::existing_path::existing_dir;
pub use matchers::existing_path::existing_file;
pub use matchers::existing_path::existing_path;
pub use matchers::is::is_not as does_not;
pub use matchers::is::is_not as not;
pub use matchers::is::is_not;
pub use matchers::is::is;
pub use matchers::none::none;
pub use matchers::regex::matches_regex as match_regex;
pub use matchers::regex::matches_regex;
pub use matchers::vecs::contains;
pub use matchers::vecs::of_len;
pub use matchers::anything::anything;
pub use matchers::type_of::type_of;
pub use matchers::all_of::all_of;
pub use matchers::all_of::all_of as and;
pub use matchers::any_of::any_of;
pub use matchers::any_of::any_of as or;
}