Skip to content

Commit

Permalink
Add test showing that assert_matches does not work.
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed May 3, 2024
1 parent acca7bf commit d3e323c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hugr/src/hugr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d3e323c

Please sign in to comment.