We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd6c871 commit ea6c1b7Copy full SHA for ea6c1b7
src/tokenizer.rs
@@ -42,8 +42,21 @@ fn preprocess(input: &str) -> String {
42
#[test]
43
fn test_preprocess() {
44
assert!("" == preprocess("").as_slice());
45
- assert!("Lorem\n\t\u{FFFD}ipusm\ndoror\u{FFFD}\n" ==
46
- preprocess("Lorem\r\n\t\x00ipusm\ndoror\u{FFFD}\r").as_slice());
+ assert!("Lorem\n\n\t\u{FFFD}ipusm\ndoror\u{FFFD}á\n" ==
+ preprocess("Lorem\r\n\n\t\x00ipusm\ndoror\u{FFFD}á\r").as_slice());
47
+}
48
+
49
+#[cfg(test)]
50
+mod bench_preprocess {
51
+ extern crate test;
52
53
+ #[bench]
54
+ fn bench_preprocess(b: &mut test::Bencher) {
55
+ let source = "Lorem\n\t\u{FFFD}ipusm\ndoror\u{FFFD}á\n";
56
+ b.iter(|| {
57
+ let _ = super::preprocess(source);
58
+ });
59
+ }
60
}
61
62
0 commit comments