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.
1 parent 1c913e7 commit 69ce895Copy full SHA for 69ce895
libc-test/Cargo.toml
@@ -87,3 +87,8 @@ harness = true
87
name = "semver"
88
path = "test/semver.rs"
89
harness = false
90
+
91
+[[test]]
92
+name = "primitive_types"
93
+path = "test/primitive_types.rs"
94
+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