about summary refs log tree commit diff
path: root/library/std/src/os/raw/tests.rs
blob: f41a22e1bcce43d9488982550e46992bc5da9599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(not(all(windows, target_env = "msvc")))]

use crate::any::TypeId;

macro_rules! ok {
    ($($t:ident)*) => {$(
        assert!(TypeId::of::<libc::$t>() == TypeId::of::<raw::$t>(),
                "{} is wrong", stringify!($t));
    )*}
}

#[test]
fn same() {
    use crate::os::raw;
    ok!(c_char c_schar c_uchar c_short c_ushort c_int c_uint c_long c_ulong
        c_longlong c_ulonglong c_float c_double);
}