From a9a50bea6049f5ef6f22cd0dcc99e0c30b09a1bd Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 5 Oct 2023 13:36:07 +0200 Subject: [PATCH] better coverage of invalid strings --- cpp/src/arrow/compute/kernels/scalar_cast_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/compute/kernels/scalar_cast_test.cc b/cpp/src/arrow/compute/kernels/scalar_cast_test.cc index 956b0193b7a6e..c84125bbdd19e 100644 --- a/cpp/src/arrow/compute/kernels/scalar_cast_test.cc +++ b/cpp/src/arrow/compute/kernels/scalar_cast_test.cc @@ -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); }