Skip to content

Commit

Permalink
better coverage of invalid strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Oct 5, 2023
1 parent 41ff1c2 commit a9a50be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/compute/kernels/scalar_cast_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ TEST(Cast, StringToDate) {
CheckCast(strings, ArrayFromJSON(date64(), "[0, null, 951782400000]"));

for (auto date_type : {date32(), date64()}) {
for (std::string not_ts : {"", "xxx", "2012-01-01 09:00:00"}) {
for (std::string not_ts : {"", "2012-01-xx", "2012-01-01 09:00:00"}) {
auto options = CastOptions::Safe(date_type);
CheckCastFails(ArrayFromJSON(string_type, "[\"" + not_ts + "\"]"), options);
}
Expand Down

0 comments on commit a9a50be

Please sign in to comment.