aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 61ca7a8..cd7923c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,7 @@
1#![allow(unreachable_patterns)] 1#![allow(unreachable_patterns)]
2#![allow(non_snake_case)] 2#![allow(non_snake_case)]
3 3
4pub mod decode;
4pub mod encode; 5pub mod encode;
5 6
6#[non_exhaustive] 7#[non_exhaustive]
@@ -107,4 +108,11 @@ mod tests {
107 let file_header_size = size_of::<ImageInfoHeader>(); 108 let file_header_size = size_of::<ImageInfoHeader>();
108 assert_eq!(16, file_header_size); 109 assert_eq!(16, file_header_size);
109 } 110 }
111
112 #[test]
113 fn encode_decode() {
114 let img = Image::new(100, 80);
115 let encoded = encode::encode_image(img).unwrap();
116 assert_eq!(encoded.len(), 1026);
117 }
110} 118}