about summary refs log tree commit diff
path: root/library/std/src/os/raw/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/os/raw/tests.rs')
-rw-r--r--library/std/src/os/raw/tests.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/library/std/src/os/raw/tests.rs b/library/std/src/os/raw/tests.rs
new file mode 100644
index 00000000000..e808faf81d6
--- /dev/null
+++ b/library/std/src/os/raw/tests.rs
@@ -0,0 +1,16 @@
+use crate::any::TypeId;
+use crate::mem;
+
+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);
+}