diff --git a/libc-test/test/primitive_types.rs b/libc-test/test/primitive_types.rs new file mode 100644 index 0000000000000..3db2d0bcf2ed9 --- /dev/null +++ b/libc-test/test/primitive_types.rs @@ -0,0 +1,15 @@ +use core::any::TypeId; + +macro_rules! ok { + ($($t:ident)*) => {$( + assert!(TypeId::of::() == TypeId::of::(), + "{} is wrong", stringify!($t)); + )*} +} + +#[test] +fn same() { + use core::ffi; + 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); +}