Skip to content

Commit

Permalink
add a test for StdError description
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Nov 7, 2016
1 parent 0f38c07 commit 8f37511
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Expand Up @@ -879,4 +879,13 @@ mod tests {
assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
assert_eq!(parse_chunk_size(b"567xf8a\r\n"), Err(::InvalidChunkSize));
}

#[cfg(feature = "std")]
#[test]
fn test_std_error() {
use super::Error;
use std::error::Error as StdError;
let err = Error::HeaderName;
assert_eq!(err.to_string(), err.description());
}
}

0 comments on commit 8f37511

Please sign in to comment.