Skip to content

Commit

Permalink
Add a few more exotic values for half round-trip
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Feb 28, 2023
1 parent 93f9f85 commit 0cd9626
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arrow2_convert/tests/test_round_trip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use arrow2_convert::{
ArrowDeserialize, ArrowField, ArrowSerialize,
};
use std::borrow::Borrow;
use std::f32::INFINITY;
use std::sync::Arc;

#[test]
Expand Down Expand Up @@ -196,7 +197,7 @@ fn test_primitive_type_vec() {

// `arrow2::types::f16` isn't a native type so we can't just use `as`
{
let original_array: Vec<arrow2::types::f16> = vec![1., 2., 3.]
let original_array: Vec<arrow2::types::f16> = vec![1.0, 2.5, 47800.0, 0.000012, -0.0, 0.0, INFINITY]
.iter()
.map(|f| arrow2::types::f16::from_f32(*f))
.collect();
Expand Down

0 comments on commit 0cd9626

Please sign in to comment.