Skip to content

Commit ba1401f

Browse files
committed
Move testing of primitive types from std
1 parent a0f5b4b commit ba1401f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

libc-test/test/primitive_types.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use core::any::TypeId;
2+
3+
macro_rules! ok {
4+
($($t:ident)*) => {$(
5+
assert!(TypeId::of::<libc::$t>() == TypeId::of::<raw::$t>(),
6+
"{} is wrong", stringify!($t));
7+
)*}
8+
}
9+
10+
#[test]
11+
fn same() {
12+
use core::ffi;
13+
ok!(c_char c_schar c_uchar c_short c_ushort c_int c_uint c_long c_ulong
14+
c_longlong c_ulonglong c_float c_double);
15+
}

0 commit comments

Comments
 (0)