Apply suggestions from code review

Reuse some variables in tests.

Signed-off-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
Richard Feldman 2024-12-11 22:09:32 -05:00 committed by GitHub
parent 5c24972a2a
commit 45cf580031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ mod specialize_structs {
expect_mono_expr_str(
format!("if {cond} then {then} else {else_}"),
format!("If(`Bool.true` -> Number(I8(42))), Number(I8(0)))"),
format!("If(`{cond}` -> Number(I8({then}))), Number(I8({else_})))"),
);
}
@ -30,7 +30,7 @@ mod specialize_structs {
expect_mono_expr_str(
format!("if {cond1} then {then1} else if {cond2} then {then2} else {then_else}"),
format!("If(`Bool.false` -> Number(I16(256))), `Bool.true` -> Number(I16(24))), Number(I16(0)))"),
format!("If(`{cond1}` -> Number(I16({then1}))), `{cond2}` -> Number(I16({then2}))), Number(I16({then_else})))"),
);
}
}