From e075e6eef2c275d9b9b511b37dad478285aecb48 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 9 Jul 2020 16:04:29 +0200 Subject: Move diagnostics tests to expect --- crates/expect/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/expect') diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs index c54e99203..21a458d47 100644 --- a/crates/expect/src/lib.rs +++ b/crates/expect/src/lib.rs @@ -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") } -- cgit v1.2.3