aboutsummaryrefslogtreecommitdiff
path: root/tests/test_spans.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_spans.rs')
-rw-r--r--tests/test_spans.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index e856a19..ca23141 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -54,13 +54,6 @@ fn annotate(html: &str, labels: Vec<(Range<usize>, impl AsRef<str>)>) -> String
.join("")
}
-fn assert_panics_but_should_not(f: impl FnOnce() + std::panic::UnwindSafe) {
- assert!(
- std::panic::catch_unwind(f).is_err(),
- "congrats! you made some span test support UTF-16, please stop calling assert_panics_but_should_not for this test"
- );
-}
-
#[test]
fn start_tag_span() {
let html = "<x> <xyz> <xyz > <xyz/>";
@@ -219,7 +212,7 @@ fn comment_data_span() {
];
let mut annotated = String::new();
- for (idx, case) in cases.iter().enumerate() {
+ for case in cases {
let labeler = |tokens: TokenIter| {
let Token::Comment(comment) = tokens
.filter(|t| !matches!(t, Token::Error { .. }))
@@ -231,16 +224,7 @@ fn comment_data_span() {
vec![(comment.data_span(), "")]
};
- println!("{idx}");
- if [
- 0, 1, 2, 3, 8, 9, 10, 11, // FIXME
- ]
- .contains(&idx)
- {
- assert_panics_but_should_not(|| assert_char_encoding_independence(case, labeler));
- } else {
- assert_char_encoding_independence(case, labeler);
- }
+ assert_char_encoding_independence(case, labeler);
annotated.push_str(&test_and_annotate(case, labeler));
}