Update can tests

This commit is contained in:
Ayaz Hafiz 2022-07-22 18:19:43 -04:00
parent e20b5f6ee1
commit 0d13dcb1af
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -377,8 +377,8 @@ mod test_can {
let arena = Bump::new();
let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
assert_eq!(problems.len(), 1);
assert!(problems.iter().all(|problem| matches!(
assert_eq!(problems.len(), 2);
assert!(problems.iter().any(|problem| matches!(
problem,
Problem::RuntimeError(RuntimeError::Shadowing { .. })
)));
@ -398,8 +398,8 @@ mod test_can {
let arena = Bump::new();
let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
assert_eq!(problems.len(), 1);
assert!(problems.iter().all(|problem| matches!(
assert_eq!(problems.len(), 2);
assert!(problems.iter().any(|problem| matches!(
problem,
Problem::RuntimeError(RuntimeError::Shadowing { .. })
)));
@ -419,9 +419,9 @@ 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| matches!(
assert!(problems.iter().any(|problem| matches!(
problem,
Problem::RuntimeError(RuntimeError::Shadowing { .. })
)));