1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); #[cfg(test)] mod tests { use super::{pixFreeData, pixRead}; use std::ffi::CString; #[test] fn image_size() { unsafe { let image = pixRead(CString::new("../test image.png").unwrap().as_ptr()); assert_eq!((*image).w, 1000); assert_eq!((*image).h, 500); pixFreeData(image); } } #[test] #[allow(path_statements)] fn defined_constants() { super::IFF_UNKNOWN; super::IFF_BMP; } }