From d3e323c7ab444204899fed9453b0ba0294b6edb7 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Fri, 3 May 2024 20:47:32 +0100 Subject: [PATCH] Add test showing that assert_matches does not work. --- hugr/src/hugr.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hugr/src/hugr.rs b/hugr/src/hugr.rs index 02b5a25b5..f80b296d7 100644 --- a/hugr/src/hugr.rs +++ b/hugr/src/hugr.rs @@ -345,10 +345,17 @@ pub enum HugrError { #[cfg(test)] mod test { + use cool_asserts::assert_matches; + use super::{Hugr, HugrView}; #[cfg(feature = "extension_inference")] use std::error::Error; + #[test] + fn test_assert_matches() { + assert_matches!(Some(5), Some(x) => x == 6); + } + #[test] fn impls_send_and_sync() { // Send and Sync are automatically impl'd by the compiler, if possible.