From 175e48e5be46faf6338d36907c6caf10c2d056f1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 27 Jun 2020 20:45:59 +0200 Subject: Remove fragile test This test needs to be updated after every change (it contains line number), which is annoying. It also fails on windows due to \, so it's easier to remove it. --- crates/expect/src/lib.rs | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs index 92364bfa7..dc4a4223e 100644 --- a/crates/expect/src/lib.rs +++ b/crates/expect/src/lib.rs @@ -78,7 +78,8 @@ impl Expect { line_start += line.len(); } let (literal_start, line_indent) = target_line.unwrap(); - let literal_length = file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`."); + let literal_length = + file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`."); let literal_range = literal_start..literal_start + literal_length; Location { line_indent, literal_range } } @@ -238,34 +239,6 @@ fn workspace_root() -> PathBuf { mod tests { use super::*; - #[test] - fn test_expect_macro() { - let empty = expect![[]]; - expect![[r#" - Expect { - file: "crates/expect/src/lib.rs", - line: 241, - column: 21, - data: "", - } - "#]] - .assert_debug_eq(&empty); - - let expect = expect![[" - hello - world - "]]; - expect![[r#" - Expect { - file: "crates/expect/src/lib.rs", - line: 252, - column: 22, - data: "\n hello\n world\n ", - } - "#]] - .assert_debug_eq(&expect); - } - #[test] fn test_format_patch() { let patch = format_patch(0, "hello\nworld\n"); -- cgit v1.2.3