mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Fix can tests
This commit is contained in:
parent
0eede1cd86
commit
095204ec7a
1 changed files with 9 additions and 3 deletions
|
@ -368,9 +368,11 @@ mod test_can {
|
|||
let arena = Bump::new();
|
||||
let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
|
||||
|
||||
assert_eq!(problems.len(), 1);
|
||||
assert_eq!(problems.len(), 2);
|
||||
assert!(problems.iter().all(|problem| match problem {
|
||||
Problem::RuntimeError(RuntimeError::Shadowing { .. }) => true,
|
||||
// Due to one of the shadows
|
||||
Problem::UnusedDef(..) => true,
|
||||
_ => false,
|
||||
}));
|
||||
}
|
||||
|
@ -389,9 +391,11 @@ mod test_can {
|
|||
let arena = Bump::new();
|
||||
let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
|
||||
|
||||
assert_eq!(problems.len(), 1);
|
||||
assert_eq!(problems.len(), 2);
|
||||
assert!(problems.iter().all(|problem| match problem {
|
||||
Problem::RuntimeError(RuntimeError::Shadowing { .. }) => true,
|
||||
// Due to one of the shadows
|
||||
Problem::UnusedDef(..) => true,
|
||||
_ => false,
|
||||
}));
|
||||
}
|
||||
|
@ -410,10 +414,12 @@ mod test_can {
|
|||
let arena = Bump::new();
|
||||
let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
|
||||
|
||||
assert_eq!(problems.len(), 1);
|
||||
assert_eq!(problems.len(), 2);
|
||||
println!("{:#?}", problems);
|
||||
assert!(problems.iter().all(|problem| match problem {
|
||||
Problem::RuntimeError(RuntimeError::Shadowing { .. }) => true,
|
||||
// Due to one of the shadows
|
||||
Problem::UnusedDef(..) => true,
|
||||
_ => false,
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue