From a02605bf74d665abdcfdd5237006f44848eb6622 Mon Sep 17 00:00:00 2001 From: tjjfvi Date: Tue, 21 May 2024 17:14:36 -0400 Subject: [PATCH] remove iteration count from snapshot --- tests/run.rs | 8 +++++--- tests/snapshots/run__file@demo_io__main.hvm.snap | 1 - tests/snapshots/run__file@f24.hvm.snap | 1 - tests/snapshots/run__file@i24.hvm.snap | 1 - tests/snapshots/run__file@sort_bitonic__main.hvm.snap | 1 - tests/snapshots/run__file@sort_radix__main.hvm.snap | 1 - tests/snapshots/run__file@stress__main.hvm.snap | 1 - tests/snapshots/run__file@sum_rec__main.hvm.snap | 1 - tests/snapshots/run__file@sum_tree__main.hvm.snap | 1 - tests/snapshots/run__file@tuples__tuples.hvm.snap | 1 - tests/snapshots/run__file@u24.hvm.snap | 1 - 11 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/run.rs b/tests/run.rs index 0e43bd18..3c94f5dc 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -68,10 +68,12 @@ fn parse_output(output: &str) -> Result { let mut parser = hvm::ast::CoreParser::new(output); parser.consume("Result:")?; let mut tree = parser.parse_tree()?; - parser.consume("- ITRS:")?; - let itrs = parser.parse_u64()?; normalize_vars(&mut tree, &mut HashMap::new()); - Ok(format!("Result: {}\n- ITRS: {}", tree.show(), itrs)) + // TODO: include iteration count in snapshot once consistent + // parser.consume("- ITRS:")?; + // let itrs = parser.parse_u64()?; + // Ok(format!("Result: {}\n- ITRS: {}", tree.show(), itrs)) + Ok(format!("Result: {}", tree.show())) } fn normalize_vars(tree: &mut Tree, vars: &mut HashMap) { diff --git a/tests/snapshots/run__file@demo_io__main.hvm.snap b/tests/snapshots/run__file@demo_io__main.hvm.snap index c14e7b63..fe036376 100644 --- a/tests/snapshots/run__file@demo_io__main.hvm.snap +++ b/tests/snapshots/run__file@demo_io__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/demo_io/main.hvm --- Result: ((@PUTTEXT (@Main__C2 ((* ((@PUTTEXT (@Main__C0 ((* ((@DRAWIMAGE (((16711680 65280) (255 16711935)) ((* ((@SLEEP ((119 3511296) ((* ((@DONE (42 x0)) x0)) x1))) x1)) x2))) x2)) x3))) x3)) x4))) x4) -- ITRS: 120 diff --git a/tests/snapshots/run__file@f24.hvm.snap b/tests/snapshots/run__file@f24.hvm.snap index 708da379..f528dbd4 100644 --- a/tests/snapshots/run__file@f24.hvm.snap +++ b/tests/snapshots/run__file@f24.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: tests/programs/f24.hvm --- Result: {+inf {-inf {+NaN {2.5 {-1.5 {1.1499939 {0.25 {0.5 {0 {1 {1 {0 {0 {0 {0 {+NaN {+inf {-inf {1.019989 {0.1000061 {0.1000061 {-0.1000061 {-0.1000061 *}}}}}}}}}}}}}}}}}}}}}}} -- ITRS: 167 diff --git a/tests/snapshots/run__file@i24.hvm.snap b/tests/snapshots/run__file@i24.hvm.snap index 52c7072f..4f8c624a 100644 --- a/tests/snapshots/run__file@i24.hvm.snap +++ b/tests/snapshots/run__file@i24.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: tests/programs/i24.hvm --- Result: {+12 {+8 {+20 {+5 {+0 {+0 {+1 {+0 {+1 {+2 {+10 {+8 {+8388607 {-8388608 {+1 {+1 {-1 {-1 *}}}}}}}}}}}}}}}}}} -- ITRS: 94 diff --git a/tests/snapshots/run__file@sort_bitonic__main.hvm.snap b/tests/snapshots/run__file@sort_bitonic__main.hvm.snap index 0563e726..ad761bb8 100644 --- a/tests/snapshots/run__file@sort_bitonic__main.hvm.snap +++ b/tests/snapshots/run__file@sort_bitonic__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/sort_bitonic/main.hvm --- Result: 16744448 -- ITRS: 253525989 diff --git a/tests/snapshots/run__file@sort_radix__main.hvm.snap b/tests/snapshots/run__file@sort_radix__main.hvm.snap index bd540445..bf9f0324 100644 --- a/tests/snapshots/run__file@sort_radix__main.hvm.snap +++ b/tests/snapshots/run__file@sort_radix__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/sort_radix/main.hvm --- Result: 16744448 -- ITRS: 110821371 diff --git a/tests/snapshots/run__file@stress__main.hvm.snap b/tests/snapshots/run__file@stress__main.hvm.snap index 94f2aa27..28987638 100644 --- a/tests/snapshots/run__file@stress__main.hvm.snap +++ b/tests/snapshots/run__file@stress__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/stress/main.hvm --- Result: 0 -- ITRS: 402675702 diff --git a/tests/snapshots/run__file@sum_rec__main.hvm.snap b/tests/snapshots/run__file@sum_rec__main.hvm.snap index e9fc27c6..ccd079ee 100644 --- a/tests/snapshots/run__file@sum_rec__main.hvm.snap +++ b/tests/snapshots/run__file@sum_rec__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/sum_rec/main.hvm --- Result: 8388608 -- ITRS: 402653167 diff --git a/tests/snapshots/run__file@sum_tree__main.hvm.snap b/tests/snapshots/run__file@sum_tree__main.hvm.snap index d92e1968..87588a2f 100644 --- a/tests/snapshots/run__file@sum_tree__main.hvm.snap +++ b/tests/snapshots/run__file@sum_tree__main.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/sum_tree/main.hvm --- Result: 1048576 -- ITRS: 44040165 diff --git a/tests/snapshots/run__file@tuples__tuples.hvm.snap b/tests/snapshots/run__file@tuples__tuples.hvm.snap index 3986b4ca..d6bf57ae 100644 --- a/tests/snapshots/run__file@tuples__tuples.hvm.snap +++ b/tests/snapshots/run__file@tuples__tuples.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: examples/tuples/tuples.hvm --- Result: ((1 (2 (3 (4 (5 (6 (7 (8 x0)))))))) x0) -- ITRS: 170000018 diff --git a/tests/snapshots/run__file@u24.hvm.snap b/tests/snapshots/run__file@u24.hvm.snap index 7ccdb398..966d2e41 100644 --- a/tests/snapshots/run__file@u24.hvm.snap +++ b/tests/snapshots/run__file@u24.hvm.snap @@ -4,4 +4,3 @@ expression: rust_output input_file: tests/programs/u24.hvm --- Result: {12 {8 {20 {5 {0 {0 {1 {0 {1 {2 {10 {8 {40 {2 {16777215 {0 {3 *}}}}}}}}}}}}}}}}} -- ITRS: 89