diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,6 +1,7 @@ | |||
1 | #![allow(unreachable_patterns)] | 1 | #![allow(unreachable_patterns)] |
2 | #![allow(non_snake_case)] | 2 | #![allow(non_snake_case)] |
3 | 3 | ||
4 | pub mod decode; | ||
4 | pub mod encode; | 5 | pub 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 | } |