| 1368 | |
| 1369 | template <typename ScalarType> |
| 1370 | void CheckListCast(const ScalarType& scalar, const std::shared_ptr<DataType>& to_type) { |
| 1371 | EXPECT_OK_AND_ASSIGN(auto cast_scalar_datum, Cast(scalar, to_type)); |
| 1372 | const auto& cast_scalar = cast_scalar_datum.scalar(); |
| 1373 | ASSERT_OK(cast_scalar->ValidateFull()); |
| 1374 | ASSERT_EQ(*cast_scalar->type, *to_type); |
| 1375 | |
| 1376 | ASSERT_EQ(scalar.is_valid, cast_scalar->is_valid); |
| 1377 | ASSERT_TRUE(scalar.is_valid); |
| 1378 | ASSERT_ARRAYS_EQUAL(*scalar.value, |
| 1379 | *checked_cast<const BaseListScalar&>(*cast_scalar).value); |
| 1380 | } |
| 1381 | |
| 1382 | template <typename ScalarType> |
| 1383 | void CheckListCastError(const ScalarType& scalar, |
no test coverage detected