]> git.proxmox.com Git - rustc.git/blob - library/std/src/sys/windows/os/tests.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / library / std / src / sys / windows / os / tests.rs
1 use crate::io::Error;
2 use crate::sys::c;
3
4 // tests `error_string` above
5 #[test]
6 fn ntstatus_error() {
7 const STATUS_UNSUCCESSFUL: u32 = 0xc000_0001;
8 assert!(
9 !Error::from_raw_os_error((STATUS_UNSUCCESSFUL | c::FACILITY_NT_BIT) as _)
10 .to_string()
11 .contains("FormatMessageW() returned error")
12 );
13 }