Skip to content

Commit

Permalink
Add test for io::Error's size.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Mar 21, 2021
1 parent f293f70 commit f398a49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/std/src/io/error/tests.rs
@@ -1,9 +1,15 @@
use super::{Custom, Error, ErrorKind, Repr};
use crate::error;
use crate::fmt;
use crate::mem::size_of;
use crate::sys::decode_error_kind;
use crate::sys::os::error_string;

#[test]
fn test_size() {
assert!(size_of::<Error>() <= size_of::<[usize; 2]>());
}

#[test]
fn test_debug_error() {
let code = 6;
Expand Down

0 comments on commit f398a49

Please sign in to comment.