Skip to content

Commit

Permalink
added example test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Jan 4, 2024
1 parent 151b2e8 commit 51686e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,10 @@ mod test {
}

#[test]
#[should_panic]
fn error_in_error_handling() {
crate::init_colour();

fn output() -> Result<usize, Report<ConversionError>> {
"NaN"
.parse::<usize>()
Expand All @@ -831,7 +834,7 @@ mod test {
})
}

let _ = output().change_context(MyError).unwrap_err();
let _ = output().change_context(MyError).unwrap();
}
#[test]
fn option_report() {
Expand Down

0 comments on commit 51686e4

Please sign in to comment.