1
Fork 0

Add test for io::Error's size.

This commit is contained in:
Mara Bos 2021-03-21 20:20:58 +01:00
parent f293f70dd8
commit f398a49829

View file

@ -1,9 +1,15 @@
use super::{Custom, Error, ErrorKind, Repr}; use super::{Custom, Error, ErrorKind, Repr};
use crate::error; use crate::error;
use crate::fmt; use crate::fmt;
use crate::mem::size_of;
use crate::sys::decode_error_kind; use crate::sys::decode_error_kind;
use crate::sys::os::error_string; use crate::sys::os::error_string;
#[test]
fn test_size() {
assert!(size_of::<Error>() <= size_of::<[usize; 2]>());
}
#[test] #[test]
fn test_debug_error() { fn test_debug_error() {
let code = 6; let code = 6;