Skip to content

Commit 6f442fe

Browse files
committed
add number test
1 parent 01e6a62 commit 6f442fe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/number.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use refined_type::less_rule;
2+
use refined_type::result::Error;
3+
4+
less_rule!((5, i8));
5+
6+
#[test]
7+
fn test_less_than_5() -> Result<(), Error> {
8+
let target = 4;
9+
let refined = Less5i8::new(target)?;
10+
assert_eq!(refined.into_value(), 4);
11+
Ok(())
12+
}

0 commit comments

Comments
 (0)