Skip to content

Commit

Permalink
Add bad test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Fischman committed Jan 26, 2024
1 parent 4f26ab3 commit 3f7ceb8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tree_unique_args/src/switch_rewrites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,23 @@ fn switch_interval2() -> Result<(), egglog::Error> {
";
crate::run_test(build, check)
}

#[test]
fn single_branch_switch() -> crate::Result {
let build = &*"
(let id1 (Id (i64-fresh!)))
(let switch1
(Switch
(Num id1 1)
(Pair
(Switch (Boolean id1 false) (Cons (Num id1 12) (Nil)))
(Switch (Boolean id1 false) (Cons (Num id1 12) (Nil)))
)))
(ExprIsValid switch1)
"
.to_string();
let check = "
(check (!= switch1 (Num id1 1)))
";
crate::run_test(build, check)
}

0 comments on commit 3f7ceb8

Please sign in to comment.