diff options
Diffstat (limited to 'integration_tests/tests')
-rw-r--r-- | integration_tests/tests/test_html5lib.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/integration_tests/tests/test_html5lib.rs b/integration_tests/tests/test_html5lib.rs index 0040a01..eac11dd 100644 --- a/integration_tests/tests/test_html5lib.rs +++ b/integration_tests/tests/test_html5lib.rs @@ -4,7 +4,7 @@ use html5lib_tests::{ parse_tests, Error as TestError, InitialState, Output, Test, Token as TestToken, }; use html5tokenizer::{ - offset::{Offset, Position}, + offset::{Offset, PosTrackingReader, Position}, reader::Reader, CdataAction, Emitter, Error, Event, InternalState, Token, Tokenizer, TracingEmitter, }; @@ -75,7 +75,10 @@ fn run_test(fname: &str, test_i: usize, test: Test) { test_i, &test, state, - Tokenizer::new(&test.input, TracingEmitter::default()), + Tokenizer::new( + PosTrackingReader::new(&test.input), + TracingEmitter::default(), + ), "TracingEmitter string", ); @@ -85,7 +88,7 @@ fn run_test(fname: &str, test_i: usize, test: Test) { &test, state, Tokenizer::new( - BufReader::new(test.input.as_bytes()), + PosTrackingReader::new(BufReader::new(test.input.as_bytes())), TracingEmitter::default(), ), "TracingEmitter bufread", @@ -183,8 +186,8 @@ trait DrainErrors<O> { fn drain_errors(&mut self) -> Box<dyn Iterator<Item = (Error, Range<O>)> + '_>; } -impl<O> DrainErrors<O> for TracingEmitter<O> { - fn drain_errors(&mut self) -> Box<dyn Iterator<Item = (Error, Range<O>)> + '_> { +impl DrainErrors<usize> for TracingEmitter { + fn drain_errors(&mut self) -> Box<dyn Iterator<Item = (Error, Range<usize>)> + '_> { Box::new(self.drain_errors()) } } |