Skip to content

Commit

Permalink
Use native usize image dimensions for {ui}16 test
Browse files Browse the repository at this point in the history
32 bit architectures don't have a 64 bit type, at least not supported by
cfitsio. Instead, set the image dimensions to use whatever the native
platform uses for dimensions (usize).
  • Loading branch information
simonrw committed Oct 27, 2021
1 parent 090d17e commit d80336a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fitsio/src/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ mod tests {
use crate::stringutils::StringList;

with_temp_file(|filename| {
let dimensions = vec![5i64, 5];
let dimensions = vec![5usize, 5];
let image_data: Vec<$type> =
(0..(dimensions[0] * dimensions[1]) as $type).collect();
let column: Vec<_> = (0..10).into_iter().map(|i| i + 200).collect();
Expand Down Expand Up @@ -636,6 +636,7 @@ mod tests {

// write the table
let ttype = StringList::from_slice(&["example".to_string()]).unwrap();
// TODO(srw): this form string should be different depending on the type
let tform = StringList::from_slice(&["1I".to_string()]).unwrap();
let tunit = StringList::from_slice(&["".to_string()]).unwrap();
unsafe {
Expand Down

0 comments on commit d80336a

Please sign in to comment.