improve test_reporting error reports

This commit is contained in:
Joshua Warner 2021-12-23 19:28:02 -08:00
parent 82d2be0635
commit 34e24fa2ba
3 changed files with 4 additions and 1 deletions

1
Cargo.lock generated
View File

@ -3671,6 +3671,7 @@ dependencies = [
"roc_problem",
"roc_region",
"roc_solve",
"roc_test_utils",
"roc_types",
"ven_pretty",
]

View File

@ -24,5 +24,6 @@ roc_constrain = { path = "../compiler/constrain" }
roc_builtins = { path = "../compiler/builtins" }
roc_problem = { path = "../compiler/problem" }
roc_parse = { path = "../compiler/parse" }
roc_test_utils = { path = "../test_utils" }
pretty_assertions = "1.0.0"
indoc = "1.0.3"

View File

@ -23,6 +23,7 @@ mod test_reporting {
};
use roc_reporting::report::{RocDocAllocator, RocDocBuilder};
use roc_solve::solve;
use roc_test_utils::assert_multiline_str_eq;
use roc_types::pretty_print::name_all_type_vars;
use roc_types::subs::Subs;
use std::path::PathBuf;
@ -236,7 +237,7 @@ mod test_reporting {
}
}
assert_eq!(buf, expected_rendering);
assert_multiline_str_eq!(expected_rendering, buf.as_str());
}
fn report_header_problem_as(src: &str, expected_rendering: &str) {