Skip to content

Commit

Permalink
Un-cfg'ed test_category, instead cfg'ing its feature-dependent part
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnScience committed Aug 9, 2024
1 parent 0ae0a60 commit a148019
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,6 @@ impl io::Read for FailReader {
}

#[test]
#[cfg(feature = "std")]
fn test_category() {
assert!(from_str::<String>("123").unwrap_err().is_data());

Expand Down Expand Up @@ -2194,8 +2193,11 @@ fn test_category() {
.unwrap_err()
.is_eof());

let fail = FailReader(io::ErrorKind::NotConnected);
assert!(from_reader::<_, String>(fail).unwrap_err().is_io());
#[cfg(feature = "std")]
{
let fail = FailReader(io::ErrorKind::NotConnected);
assert!(from_reader::<_, String>(fail).unwrap_err().is_io());
}
}

#[test]
Expand Down

0 comments on commit a148019

Please sign in to comment.