mod tiff; #[cfg(test)] mod tests { use super::*; #[test] fn it_works() { assert_eq!(0, 0); } #[test] fn ignore_warning_test() { tiff::ignore_warnings(); assert_eq!(0, 0); } #[test] fn tiff_open_test() { tiff::ignore_warnings(); if let Some(result) = tiff::open("../test.tif") { tiff::close(result); } else { assert!(false); } } #[test] fn tiff_height_test() { tiff::ignore_warnings(); if let Some(t_handle) = tiff::open("../test.tif") { let height = tiff::get_height(t_handle); assert!(height > 0); println!("{:?}", height); tiff::close(t_handle); } else { assert!(false); } } #[test] fn tiff_width_test() { tiff::ignore_warnings(); if let Some(t_handle) = tiff::open("../test.tif") { let width = tiff::get_width(t_handle); assert!(width > 0); println!("{:?}", width); tiff::close(t_handle); } else { assert!(false); } } }