blob: cc88bd47072566d1702649e9de45eebf5f0bffe7 [file]
use crate::io::Error;
use crate::sys::pal::c;
// tests `format_error`
#[test]
fn ntstatus_error() {
const STATUS_UNSUCCESSFUL: i32 = 0xc000_0001_u32 as i32;
assert!(
!Error::from_raw_os_error((STATUS_UNSUCCESSFUL | c::FACILITY_NT_BIT) as _)
.to_string()
.contains("FormatMessageW() returned error")
);
}