Skip to content

Commit

Permalink
Add nested test
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Dec 6, 2023
1 parent b631643 commit 63c6e8d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/array/fixed_size_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,5 +367,18 @@ mod tests {
.collect::<Vec<_>>(),
input_nullable_string_nullable
);

let input_nested = [[[1, 2], [3, 4], [5, 6]], [[7, 8], [9, 0], [0, 0]]];
let array_nested = input_nested
.into_iter()
.collect::<FixedSizeListArray<3, FixedSizeListArray<2, FixedSizePrimitiveArray<u8>>>>();
assert_eq!(
array_nested.into_iter().collect::<Vec<_>>(),
[
[[&1, &2], [&3, &4], [&5, &6]],
[[&7, &8], [&9, &0], [&0, &0]]
]
);
assert_eq!(array_nested.0 .0 .0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0]);
}
}

0 comments on commit 63c6e8d

Please sign in to comment.