Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 9989177

Browse files
committed
Add test for result matching
1 parent c9b3757 commit 9989177

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/tests.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,21 @@ fn error_patterns() {
490490
}
491491
}
492492

493+
#[test]
494+
fn result_match() {
495+
error_chain! { }
496+
497+
fn ok() -> Result<()> {
498+
Ok(())
499+
}
500+
501+
match ok() {
502+
Ok(()) => {},
503+
Err(Error(ErrorKind::Msg(_), _)) => {},
504+
Err(..) => {},
505+
}
506+
}
507+
493508
#[test]
494509
fn error_first() {
495510
error_chain! {

0 commit comments

Comments
 (0)