diff options
author | Aleksey Kladov <[email protected]> | 2020-07-09 15:04:29 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-09 15:04:29 +0100 |
commit | e075e6eef2c275d9b9b511b37dad478285aecb48 (patch) | |
tree | 30f30c3e79915e8d6ea5c472f7a4b4ccce75a5d8 /crates/expect | |
parent | d70f4f5da5cb12c267aa9eb4c0a23d00bdd01608 (diff) |
Move diagnostics tests to expect
Diffstat (limited to 'crates/expect')
-rw-r--r-- | crates/expect/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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 { | |||
121 | } | 121 | } |
122 | Runtime::fail_file(self, &expected, actual); | 122 | Runtime::fail_file(self, &expected, actual); |
123 | } | 123 | } |
124 | pub fn assert_debug_eq(&self, actual: &impl fmt::Debug) { | ||
125 | let actual = format!("{:#?}\n", actual); | ||
126 | self.assert_eq(&actual) | ||
127 | } | ||
124 | fn read(&self) -> String { | 128 | fn read(&self) -> String { |
125 | fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n") | 129 | fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n") |
126 | } | 130 | } |