Add test_gen tests for early returns

This commit is contained in:
Sam Mohr 2024-10-24 23:31:34 -07:00
parent ca762127e5
commit 8a0cc10c93
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
3 changed files with 118 additions and 2 deletions

View file

@ -918,7 +918,8 @@ fn to_expr_report<'b>(
alloc.reflow("But I need every "),
alloc.keyword("expect"),
alloc.reflow(" condition to evaluate to a "),
alloc.reflow("Bool—either "),
alloc.type_str("Bool"),
alloc.reflow("—either "),
alloc.tag("Bool.true".into()),
alloc.reflow(" or "),
alloc.tag("Bool.false".into()),
@ -957,7 +958,8 @@ fn to_expr_report<'b>(
alloc.reflow("But I need every "),
alloc.keyword("if"),
alloc.reflow(" condition to evaluate to a "),
alloc.reflow("Bool—either "),
alloc.type_str("Bool"),
alloc.reflow("—either "),
alloc.tag("Bool.true".into()),
alloc.reflow(" or "),
alloc.tag("Bool.false".into()),
@ -995,6 +997,7 @@ fn to_expr_report<'b>(
alloc.reflow("But I need every "),
alloc.keyword("if"),
alloc.reflow(" guard condition to evaluate to a "),
alloc.type_str("Bool"),
alloc.reflow("—either "),
alloc.tag("Bool.true".into()),
alloc.reflow(" or "),