Skip to content

Commit d66235a

Browse files
committed
fix tests
1 parent 1c5b209 commit d66235a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/tools/tidy/src/watcher/tests.rs

+16-4
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,30 @@ use super::*;
44
fn test_span_hash_one_line() {
55
let source = "some text\ntidy-tag\ncheckme=42\ntidy-tag\n";
66
let tag = "tidy-tag";
7-
assert_eq!("42258eba764c3f94a24de379e5715dc8", span_hash(source, tag, &mut true).unwrap());
7+
assert_eq!(
8+
"42258eba764c3f94a24de379e5715dc8",
9+
span_hash(source, tag, &mut true, Path::new("")).unwrap()
10+
);
811
}
912

1013
#[test]
1114
fn test_span_hash_multiple_lines() {
1215
let source = "some text\ntidy-tag\ncheckme=42\nother line\ntidy-tag\n";
1316
let tag = "tidy-tag";
14-
assert_eq!("49cb23dc2032ceea671ca48092750a1c", span_hash(source, tag, &mut true).unwrap());
17+
assert_eq!(
18+
"49cb23dc2032ceea671ca48092750a1c",
19+
span_hash(source, tag, &mut true, Path::new("")).unwrap()
20+
);
1521
}
1622

1723
#[test]
1824
fn test_span_hash_has_some_text_in_line_with_tag() {
1925
let source = "some text\ntidy-tag ignore me\ncheckme=42\nother line\ntidy-tag\n";
2026
let tag = "tidy-tag";
21-
assert_eq!("49cb23dc2032ceea671ca48092750a1c", span_hash(source, tag, &mut true).unwrap());
27+
assert_eq!(
28+
"49cb23dc2032ceea671ca48092750a1c",
29+
span_hash(source, tag, &mut true, Path::new("")).unwrap()
30+
);
2231
}
2332

2433
#[test]
@@ -35,5 +44,8 @@ RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_C
3544
mv rustc-perf-$PERF_COMMIT rustc-perf && \
3645
rm perf.zip"#;
3746
let tag = "tidy-ticket-perf-commit";
38-
assert_eq!("76c8d9783e38e25a461355f82fcd7955", span_hash(source, tag, &mut true).unwrap());
47+
assert_eq!(
48+
"76c8d9783e38e25a461355f82fcd7955",
49+
span_hash(source, tag, &mut true, Path::new("")).unwrap()
50+
);
3951
}

0 commit comments

Comments
 (0)