Skip to content

Commit

Permalink
Fix up intermediate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Oct 31, 2023
1 parent 10e043a commit 9d70c52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/compiler/optimizer/cse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ fn test_check_and_retrieve_1() {
let else_clause = Rc::new(BodyForm::Value(SExp::Nil(Srcloc::start("*test*"))));
assert_eq!(
car.generate_body_if(else_clause).to_sexp().to_string(),
"(if (all (q . 1) arg (f arg) (r (f arg))) (r (f arg)) ())"
"(a (i (all (q . 1) arg (f arg)) (com (r (f arg))) (com ())) @)"
);
}

Expand All @@ -532,7 +532,7 @@ fn test_check_and_retrieve_2() {
let else_clause = Rc::new(BodyForm::Value(SExp::Nil(Srcloc::start("*test*"))));
assert_eq!(
car.generate_body_if(else_clause).to_sexp().to_string(),
"(if (all (all (all arg (r arg))) arg (f arg) (r (f arg))) (r (f arg)) ())"
"(a (i (all (all (all arg (r arg))) arg (f arg)) (com (r (f arg))) (com ())) @)"
);
}

Expand Down Expand Up @@ -649,7 +649,7 @@ fn test_if_with_gate_generate_0() {
in_gate: in_gate_set,
otherwise_reachable: otherwise_set,
};
assert_eq!(iwg.generate().to_sexp().to_string(), "(if (all arg (r arg) (r (r arg))) (if (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (f (f (r (r (r (r arg)))))) (if (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (r (f (r (r (r (r arg)))))) (q))) (if (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (r (f (r (r (r (r arg)))))) (q)))");
assert_eq!(iwg.generate().to_sexp().to_string(), "(a (i (all arg (r arg) (r (r arg))) (com (a (i (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (com (f (f (r (r (r (r arg))))))) (com (a (i (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (com (r (f (r (r (r (r arg))))))) (com (q))) @))) @)) (com (a (i (all (q . 1) arg (r arg) (r (r arg)) (r (r (r arg))) (r (r (r (r arg)))) (f (r (r (r (r arg)))))) (com (r (f (r (r (r (r arg))))))) (com (q))) @))) @)");
}

impl GenerateTrickyCSE {
Expand Down

0 comments on commit 9d70c52

Please sign in to comment.