Skip to content

Commit

Permalink
Remove excess test
Browse files Browse the repository at this point in the history
After removing StartText event in #459 text events can be generated
at the beginning of the stream
  • Loading branch information
Mingun authored and dralley committed Aug 27, 2022
1 parent b8f4b11 commit 1b0259d
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1579,16 +1579,6 @@ mod test {
use crate::reader::Reader;
use pretty_assertions::assert_eq;

#[$test]
$($async)? fn text_at_start() {
let mut reader = Reader::from_str("text");

assert_eq!(
reader.$read_event($buf) $(.$await)? .unwrap(),
Event::Text(BytesText::from_escaped("text").into())
);
}

#[$test]
#[should_panic] // Failure is expected until read_until_open() is smart enough to skip over irrelevant text events.
$($async)? fn bom_at_start() {
Expand Down Expand Up @@ -1663,15 +1653,9 @@ mod test {
);
}

/// Text event cannot be generated without preceding event of another type
#[$test]
$($async)? fn text() {
let mut reader = Reader::from_str("<tag/>text");

assert_eq!(
reader.$read_event($buf) $(.$await)? .unwrap(),
Event::Empty(BytesStart::new("tag"))
);
let mut reader = Reader::from_str("text");

assert_eq!(
reader.$read_event($buf) $(.$await)? .unwrap(),
Expand Down

0 comments on commit 1b0259d

Please sign in to comment.