From 4b1031f409daf74a171deb0e3d86b362abf8f542 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Wed, 18 Dec 2024 12:33:49 +0000 Subject: [PATCH] run tests with validation --- hugr-passes/src/monomorphize.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hugr-passes/src/monomorphize.rs b/hugr-passes/src/monomorphize.rs index c17e8bb81..376b4a3ab 100644 --- a/hugr-passes/src/monomorphize.rs +++ b/hugr-passes/src/monomorphize.rs @@ -408,9 +408,7 @@ mod test { let [i1] = dfg_builder.input_wires_arr(); let hugr = dfg_builder.finish_hugr_with_outputs([i1]).unwrap(); let mut hugr2 = hugr.clone(); - MonomorphizePass::default() - .run_no_validate(&mut hugr2) - .unwrap(); + MonomorphizePass::default().run(&mut hugr2).unwrap(); assert_eq!(hugr, hugr2); } @@ -472,7 +470,7 @@ mod test { .count(), 3 ); - MonomorphizePass::default().run_no_validate(&mut hugr)?; + MonomorphizePass::default().run(&mut hugr)?; let mono = hugr; mono.validate()?; @@ -493,7 +491,7 @@ mod test { ["double", "main", "triple"] ); let mut mono2 = mono.clone(); - MonomorphizePass::default().run_no_validate(&mut mono2)?; + MonomorphizePass::default().run(&mut mono2)?; assert_eq!(mono2, mono); // Idempotent @@ -600,9 +598,7 @@ mod test { .outputs_arr(); let mut hugr = outer.finish_hugr_with_outputs([e1, e2]).unwrap(); - MonomorphizePass::default() - .run_no_validate(&mut hugr) - .unwrap(); + MonomorphizePass::default().run(&mut hugr).unwrap(); let mono_hugr = hugr; mono_hugr.validate().unwrap(); let funcs = list_funcs(&mono_hugr); @@ -663,7 +659,7 @@ mod test { let mono = mono.finish_with_outputs([a, b]).unwrap(); let c = dfg.call(mono.handle(), &[], dfg.input_wires()).unwrap(); let mut hugr = dfg.finish_hugr_with_outputs(c.outputs()).unwrap(); - MonomorphizePass::default().run_no_validate(&mut hugr)?; + MonomorphizePass::default().run(&mut hugr)?; let mono_hugr = hugr; let mut funcs = list_funcs(&mono_hugr); @@ -720,9 +716,7 @@ mod test { module_builder.finish_hugr().unwrap() }; - MonomorphizePass::default() - .run_no_validate(&mut hugr) - .unwrap(); + MonomorphizePass::default().run(&mut hugr).unwrap(); remove_polyfuncs_ref(&mut hugr); let funcs = list_funcs(&hugr);