diff --git a/tests/error_tests.rs b/tests/error_tests.rs index 1fe62c9..b061960 100644 --- a/tests/error_tests.rs +++ b/tests/error_tests.rs @@ -28,3 +28,10 @@ fn bad_json() { assert!(res.is_err()); println!("{:#?}", res); } + +#[test] +#[should_panic] +fn invalid_unwrap() { + let wrapped = JSONValue::from(5.2f64); + let invalid: String = wrapped.unwrap(); +}