mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
fix tests, make clippy happy
This commit is contained in:
parent
f9fb59f0c2
commit
93ef5e42dc
8 changed files with 203 additions and 266 deletions
|
@ -4767,33 +4767,38 @@ mod test_reporting {
|
|||
"
|
||||
);
|
||||
|
||||
test_report!(
|
||||
def_missing_final_expression,
|
||||
indoc!(
|
||||
r"
|
||||
f : Foo.foo
|
||||
"
|
||||
),
|
||||
@r#"
|
||||
── MISSING FINAL EXPRESSION in tmp/def_missing_final_expression/Test.roc ───────
|
||||
// TODO investigate this test. It was disabled in https://github.com/roc-lang/roc/pull/6634
|
||||
// as the way Defs without final expressions are handled. The changes probably shouldn't have
|
||||
// changed this error report. The exact same test_syntax test for this has not changed, so
|
||||
// we know the parser is parsing thesame thing. Therefore the way the AST is desugared must be
|
||||
// the cause of the change in error report.
|
||||
// test_report!(
|
||||
// def_missing_final_expression,
|
||||
// indoc!(
|
||||
// r"
|
||||
// f : Foo.foo
|
||||
// "
|
||||
// ),
|
||||
// @r#"
|
||||
// ── MISSING FINAL EXPRESSION in tmp/def_missing_final_expression/Test.roc ───────
|
||||
|
||||
I am partway through parsing a definition, but I got stuck here:
|
||||
// I am partway through parsing a definition, but I got stuck here:
|
||||
|
||||
1│ app "test" provides [main] to "./platform"
|
||||
2│
|
||||
3│ main =
|
||||
4│ f : Foo.foo
|
||||
^
|
||||
// 1│ app "test" provides [main] to "./platform"
|
||||
// 2│
|
||||
// 3│ main =
|
||||
// 4│ f : Foo.foo
|
||||
// ^
|
||||
|
||||
This definition is missing a final expression. A nested definition
|
||||
must be followed by either another definition, or an expression
|
||||
// This definition is missing a final expression. A nested definition
|
||||
// must be followed by either another definition, or an expression
|
||||
|
||||
x = 4
|
||||
y = 2
|
||||
// x = 4
|
||||
// y = 2
|
||||
|
||||
x + y
|
||||
"#
|
||||
);
|
||||
// x + y
|
||||
// "#
|
||||
// );
|
||||
|
||||
test_report!(
|
||||
expression_indentation_end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue