Test to ensure that usize can hold a 32-bit offset.
This commit is contained in:
parent
6f9be2c2a9
commit
4175aa5bc4
11
src/lib.rs
11
src/lib.rs
|
@ -44,3 +44,14 @@ mod tag;
|
|||
mod tiff;
|
||||
mod util;
|
||||
mod value;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::mem;
|
||||
|
||||
// This library assumes that usize is not smaller than u32.
|
||||
#[test]
|
||||
fn size_of_usize() {
|
||||
assert!(mem::size_of::<usize>() >= mem::size_of::<u32>());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue