Skip to content

Commit

Permalink
[test] Check round trip serialization on validate
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-q committed Apr 18, 2024
1 parent b7df2ef commit c5028f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hugr/src/hugr/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ impl<'a, 'b> ValidationContext<'a, 'b> {
// Hierarchy and children. No type variables declared outside the root.
self.validate_subtree(self.hugr.root(), &[])?;

#[cfg(test)]
{
crate::hugr::serialize::test::check_hugr_roundtrip(self.hugr);
}

Ok(())
}

Expand Down

0 comments on commit c5028f1

Please sign in to comment.