summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs5
-rw-r--r--src/tiff.rs22
2 files changed, 4 insertions, 23 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ebec3fc..e1ee558 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-mod tiff;
+pub mod tiff;
pub const TEST_IMAGE_PATH: &str = "../test.tif";
@@ -56,6 +56,7 @@ mod tests {
tiff::ignore_warnings();
if let Some(t_handle) = tiff::open(TEST_IMAGE_PATH) {
let channels = tiff::get_image_channels(t_handle);
+ assert!(channels > 0);
tiff::close(t_handle);
} else {
assert!(false);
@@ -66,7 +67,7 @@ mod tests {
fn tiff_read() {
tiff::ignore_warnings();
if let Some(t_handle) = tiff::open(TEST_IMAGE_PATH) {
- let data = tiff::read(t_handle);
+ let _data = tiff::read(t_handle);
tiff::close(t_handle);
} else {
assert!(false);
diff --git a/src/tiff.rs b/src/tiff.rs
index 53b8de9..6d14e81 100644
--- a/src/tiff.rs
+++ b/src/tiff.rs
@@ -155,27 +155,7 @@ mod tests {
fn tiff_strip_read() {
ignore_warnings();
if let Some(t_handle) = open(crate::TEST_IMAGE_PATH) {
- let strip = read_strip(t_handle, 0);
- close(t_handle);
- } else {
- assert!(false);
- }
- }
-
- #[test]
- fn tiff_data_depth() {
- ignore_warnings();
- if let Some(t_handle) = open(crate::TEST_IMAGE_PATH) {
- let strip_size = get_strip_size(t_handle);
- let strip_count = get_strip_count(t_handle);
- let strip_depth = strip_size * strip_count;
- assert!(strip_depth > 0);
- let image_width = get_image_width(t_handle);
- let image_height = get_image_height(t_handle);
- let image_depth = image_width * image_height;
- assert!(image_depth > 0);
- let strip_depth = strip_depth as f64;
- let image_depth = image_depth as f64;
+ let _strip = read_strip(t_handle, 0);
close(t_handle);
} else {
assert!(false);