Skip to content

Commit

Permalink
Remove excess test
Browse files Browse the repository at this point in the history
After removing StartText event in tafia#459 text events can be generated
at the beginning of the stream
  • Loading branch information
Mingun committed Aug 26, 2022
1 parent 265ff08 commit fca7178
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/reader/mod.rs
Expand Up @@ -1571,16 +1571,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 @@ -1655,15 +1645,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 fca7178

Please sign in to comment.