From 06b2bebce83edc234f0e9cd1b54054d3a2322d66 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Sat, 14 Sep 2019 21:09:23 +0300 Subject: [PATCH] Add a test for the types --- src/types.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/types.rs b/src/types.rs index 3e79cac..f0e761b 100644 --- a/src/types.rs +++ b/src/types.rs @@ -23,4 +23,19 @@ impl fmt::Debug for c_void { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.pad("c_void") } +} + +#[cfg(test)] +mod tests { + use std::os::raw; + use std::any::TypeId; + use types; + + #[test] + fn verify_types() { + assert_eq!(TypeId::of::(), TypeId::of::()); + assert_eq!(TypeId::of::(), TypeId::of::()); + assert_eq!(TypeId::of::(), TypeId::of::()); + assert_eq!(TypeId::of::(), TypeId::of::()); + } } \ No newline at end of file