Skip to content

Commit

Permalink
chore: add comment for should fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikkon committed Oct 26, 2024
1 parent 8befef6 commit f0d9886
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arrow-array/src/builder/generic_list_view_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ mod tests {
#[should_panic(
expected = "Non-nullable field of ListViewArray \\\"item\\\" cannot contain nulls"
)]
// If a non-nullable type is declared but a null value is used, it will be intercepted by the null check.
fn test_checks_nullability() {
let field = Arc::new(Field::new("item", DataType::Int32, false));
let mut builder = ListViewBuilder::new(Int32Builder::new()).with_field(field.clone());
Expand All @@ -696,6 +697,7 @@ mod tests {

#[test]
#[should_panic(expected = "ListViewArray expected data type Int64 got Int32")]
// If the declared type does not match the actual appended type, it will be intercepted by type checking in the finish function.
fn test_checks_data_type() {
let field = Arc::new(Field::new("item", DataType::Int64, false));
let mut builder = ListViewBuilder::new(Int32Builder::new()).with_field(field.clone());
Expand Down

0 comments on commit f0d9886

Please sign in to comment.