Skip to content

Commit

Permalink
Use the new customOp eq impl to simplify the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Apr 12, 2024
1 parent df43604 commit 9936294
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions hugr/src/hugr/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,7 @@ pub mod test {
for node in new_hugr.nodes() {
let new_op = new_hugr.get_optype(node);
let old_op = h_canon.get_optype(node);
if let OpType::CustomOp(new_op) = new_op {
if let OpType::CustomOp(old_op) = old_op {
assert_eq!(new_op.clone().into_opaque(), old_op.clone().into_opaque());
} else {
panic!("Expected old_op to be a custom op");
}
} else {
assert_eq!(new_op, old_op);
}
assert_eq!(new_op, old_op);
}

// Check that the graphs are equivalent up to port renumbering.
Expand Down

0 comments on commit 9936294

Please sign in to comment.