Skip to content

Commit

Permalink
test across namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaeff committed Nov 21, 2024
1 parent 1e15180 commit 19e31ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pilopt/tests/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,23 @@ fn deduplicate_fixed() {
col witness X;
col witness Y;
X * first = Y * second;
namespace M(65536);
col fixed first = [1, 32]*;
col fixed second = [1, 32]*;
col witness X;
col witness Y;
X * first = Y * second;
"#;
let expectation = r#"namespace N(65536);
col fixed first = [1_fe, 32_fe]*;
col witness X;
col witness Y;
N::X * N::first = N::Y * N::first;
namespace M(65536);
col fixed first = [1_fe, 32_fe]*;
col witness X;
col witness Y;
M::X * M::first = M::Y * M::first;
"#;
let optimized = optimize(analyze_string::<GoldilocksField>(input).unwrap()).to_string();
assert_eq!(optimized, expectation);
Expand Down

0 comments on commit 19e31ac

Please sign in to comment.