Skip to content

Commit

Permalink
test: one more test for base26_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentElement committed Jul 22, 2024
1 parent fbca7e0 commit b19f9af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ fn show_precedence_cla(
Var(i) => {
let i = *i as u32;
let ix = if i <= depth {
depth - i
depth - i
} else {
max_depth + i - depth - 1
};
Expand Down Expand Up @@ -693,6 +693,10 @@ mod tests {
abs!(27, app!(Var(28), Var(29), Var(30), Var(50), Var(702), Var(703))).to_string(),
"λa.λb.λc.λd.λe.λf.λg.λh.λi.λj.λk.λl.λm.λn.λo.λp.λq.λr.λs.λt.λu.λv.λw.λx.λy.λz.λaa.ab ac ad ax zz aaa"
);
assert_eq!(
abs!(3, app!(Var(2), Var(3), Var(4))).to_string(),
"λa.λb.λc.b a d"
);
assert_eq!(Var(26).to_string(), "z");
assert_eq!(Var(27).to_string(), "aa");
}
Expand Down

0 comments on commit b19f9af

Please sign in to comment.