diff --git a/compiler/solve/tests/solve_expr.rs b/compiler/solve/tests/solve_expr.rs index 209979e536..2411b13df5 100644 --- a/compiler/solve/tests/solve_expr.rs +++ b/compiler/solve/tests/solve_expr.rs @@ -255,8 +255,15 @@ mod solve_expr { let can_problems = can_problems.remove(&home).unwrap_or_default(); let type_problems = type_problems.remove(&home).unwrap_or_default(); - assert_eq!(can_problems, Vec::new(), "Canonicalization problems: "); - assert_eq!(type_problems, Vec::new(), "Type problems: "); + let (can_problems, type_problems) = + format_problems(&src, home, &interns, can_problems, type_problems); + + assert!( + can_problems.is_empty(), + "Canonicalization problems: {}", + can_problems + ); + assert!(type_problems.is_empty(), "Type problems: {}", type_problems); let queries = parse_queries(&src); assert!(!queries.is_empty(), "No queries provided!"); diff --git a/reporting/tests/test_reporting.rs b/reporting/tests/test_reporting.rs index f4614df125..6918dfd6d9 100644 --- a/reporting/tests/test_reporting.rs +++ b/reporting/tests/test_reporting.rs @@ -10012,6 +10012,7 @@ I need all branches in an `if` to have the same type! ) } + #[test] fn branches_have_more_cases_than_condition() { new_report_problem_as( indoc!(