Skip to content

Commit 175e48e

Browse files
committed
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.
1 parent 18e4e9f commit 175e48e

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

crates/expect/src/lib.rs

+2-29
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ impl Expect {
7878
line_start += line.len();
7979
}
8080
let (literal_start, line_indent) = target_line.unwrap();
81-
let literal_length = file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`.");
81+
let literal_length =
82+
file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`.");
8283
let literal_range = literal_start..literal_start + literal_length;
8384
Location { line_indent, literal_range }
8485
}
@@ -238,34 +239,6 @@ fn workspace_root() -> PathBuf {
238239
mod tests {
239240
use super::*;
240241

241-
#[test]
242-
fn test_expect_macro() {
243-
let empty = expect![[]];
244-
expect![[r#"
245-
Expect {
246-
file: "crates/expect/src/lib.rs",
247-
line: 241,
248-
column: 21,
249-
data: "",
250-
}
251-
"#]]
252-
.assert_debug_eq(&empty);
253-
254-
let expect = expect![["
255-
hello
256-
world
257-
"]];
258-
expect![[r#"
259-
Expect {
260-
file: "crates/expect/src/lib.rs",
261-
line: 252,
262-
column: 22,
263-
data: "\n hello\n world\n ",
264-
}
265-
"#]]
266-
.assert_debug_eq(&expect);
267-
}
268-
269242
#[test]
270243
fn test_format_patch() {
271244
let patch = format_patch(0, "hello\nworld\n");

0 commit comments

Comments
 (0)