mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Do not attempt to lookup functions in expect
s
Functions are not useful to print in expect results, because they are only printed opaquely as `<function>`. Moreover, their transformation to closure sets during mono can be extremely lossy, up to and including the elision of symbols for function closure symbols. As such, simply do not attempt to lookup or print functions referenced in expects. Closes #4389
This commit is contained in:
parent
50fac9cc9e
commit
5164994fb5
4 changed files with 77 additions and 17 deletions
|
@ -923,13 +923,34 @@ mod test {
|
|||
|
||||
When it failed, these variables had these values:
|
||||
|
||||
forcer : Str -> U8
|
||||
forcer = <function>
|
||||
|
||||
case : Str
|
||||
case = ""
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_i4389() {
|
||||
run_expect_test(
|
||||
indoc!(
|
||||
r#"
|
||||
interface Test exposes [] imports []
|
||||
|
||||
expect
|
||||
totalCount = \{} -> 1u8
|
||||
totalCount {} == 96u8
|
||||
"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
This expectation failed:
|
||||
|
||||
3│> expect
|
||||
4│> totalCount = \{} -> 1u8
|
||||
5│> totalCount {} == 96u8
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue