Move diagnostics tests to expect

This commit is contained in:
Aleksey Kladov
2020-07-09 16:04:29 +02:00
parent d70f4f5da5
commit e075e6eef2
14 changed files with 53 additions and 113 deletions

View File

@@ -121,6 +121,10 @@ impl ExpectFile {
}
Runtime::fail_file(self, &expected, actual);
}
pub fn assert_debug_eq(&self, actual: &impl fmt::Debug) {
let actual = format!("{:#?}\n", actual);
self.assert_eq(&actual)
}
fn read(&self) -> String {
fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n")
}