Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jan 9, 2022
1 parent b9dee67 commit 13d6bac
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions arrow/src/array/array_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,7 @@ impl<T: StringOffsetSizeTrait> From<GenericListArray<T>> for GenericStringArray<
#[cfg(test)]
mod tests {

use crate::{
array::{ListBuilder, StringBuilder},
util::test_util::BadIterator,
};
use crate::array::{ListBuilder, StringBuilder};

use super::*;

Expand Down Expand Up @@ -581,8 +578,10 @@ mod tests {
.expect("All null array has valid array data");
}

#[cfg(feature = "test_utils")]
#[test]
fn bad_size_collect_string() {
use crate::util::test_util::BadIterator;
let data = vec![Some("foo"), None, Some("bar")];
let expected: StringArray = data.clone().into_iter().collect();

Expand All @@ -595,8 +594,10 @@ mod tests {
assert_eq!(expected, arr);
}

#[cfg(feature = "test_utils")]
#[test]
fn bad_size_collect_large_string() {
use crate::util::test_util::BadIterator;
let data = vec![Some("foo"), None, Some("bar")];
let expected: LargeStringArray = data.clone().into_iter().collect();

Expand All @@ -609,8 +610,10 @@ mod tests {
assert_eq!(expected, arr);
}

#[cfg(feature = "test_utils")]
#[test]
fn bad_size_iter_values_string() {
use crate::util::test_util::BadIterator;
let data = vec!["foo", "bar", "baz"];
let expected: StringArray = data.clone().into_iter().map(Some).collect();

Expand All @@ -623,8 +626,10 @@ mod tests {
assert_eq!(expected, arr);
}

#[cfg(feature = "test_utils")]
#[test]
fn bad_size_iter_values_large_string() {
use crate::util::test_util::BadIterator;
let data = vec!["foo", "bar", "baz"];
let expected: LargeStringArray = data.clone().into_iter().map(Some).collect();

Expand Down

0 comments on commit 13d6bac

Please sign in to comment.