We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d1df54e + d4da6c8 commit c8cc152Copy full SHA for c8cc152
libc-test/Cargo.toml
@@ -85,3 +85,8 @@ harness = true
85
name = "semver"
86
path = "test/semver.rs"
87
harness = false
88
+
89
+[[test]]
90
+name = "primitive_types"
91
+path = "test/primitive_types.rs"
92
+harness = true
libc-test/test/primitive_types.rs
@@ -0,0 +1,15 @@
1
+use std::any::TypeId;
2
3
+macro_rules! ok {
4
+ ($($t:ident)*) => {$(
5
+ assert!(TypeId::of::<libc::$t>() == TypeId::of::<ffi::$t>(),
6
+ "{} is wrong", stringify!($t));
7
+ )*}
8
+}
9
10
+#[test]
11
+fn same() {
12
+ use std::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