1 2 3 4 5 6 7 8 9 10 11
#[cfg(feature = "1_1")] #[test] fn test_malloc() { use libwebp_sys::{WebPFree, WebPMalloc}; unsafe { let ptr = WebPMalloc(12); assert!(!ptr.is_null()); WebPFree(ptr); } }