summaryrefslogtreecommitdiffstats
path: root/src/conversion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversion.rs')
-rw-r--r--src/conversion.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conversion.rs b/src/conversion.rs
index a3d8203..5e7751c 100644
--- a/src/conversion.rs
+++ b/src/conversion.rs
@@ -74,6 +74,17 @@ mod tests {
}
#[test]
+ fn check_assert_matches() {
+ assert_invalid_input_data::<()>(Err(Error::InvalidInputData));
+ }
+
+ #[test]
+ #[should_panic]
+ fn check_assert_fails() {
+ assert_invalid_input_data::<()>(Ok(0));
+ }
+
+ #[test]
fn convert_threshold_12_bits() {
assert_invalid_input_data::<()>(ic::Resolution12Bit::convert_threshold(2048));
assert_invalid_input_data::<()>(ic::Resolution12Bit::convert_threshold(-2049));