@@ -1225,8 +1225,8 @@ TYPED_TEST(TestStringKernels, Utf8Upper) {
12251225 // test maximum buffer growth
12261226 this ->CheckUnary (" utf8_upper" , " [\" ɑɑɑɑ\" ]" , this ->type (), " [\" ⱭⱭⱭⱭ\" ]" );
12271227
1228- // Test invalid data
1229- auto invalid_input = ArrayFromJSON ( this ->type (), " [ \" ɑa\xFF ɑ\ " , \ " ɽ\xe1\xbd ɽaa\" ] " );
1228+ // Test invalid data - use MakeArray since simdjson validates UTF-8 strictly
1229+ auto invalid_input = this ->MakeArray ({ " ɑa\xFF ɑ" , " ɽ\xe1\xbd ɽaa" } );
12301230 EXPECT_RAISES_WITH_MESSAGE_THAT (Invalid, testing::HasSubstr (" Invalid UTF8 sequence" ),
12311231 CallFunction (" utf8_upper" , {invalid_input}));
12321232}
@@ -1247,8 +1247,8 @@ TYPED_TEST(TestStringKernels, Utf8Lower) {
12471247 // test maximum buffer growth
12481248 this ->CheckUnary (" utf8_lower" , " [\" ȺȺȺȺ\" ]" , this ->type (), " [\" ⱥⱥⱥⱥ\" ]" );
12491249
1250- // Test invalid data
1251- auto invalid_input = ArrayFromJSON ( this ->type (), " [ \" Ⱥa\xFF Ɑ\ " , \ " Ɽ\xe1\xbd ⱤaA\" ] " );
1250+ // Test invalid data - use MakeArray since simdjson validates UTF-8 strictly
1251+ auto invalid_input = this ->MakeArray ({ " Ⱥa\xFF Ɑ" , " Ɽ\xe1\xbd ⱤaA" } );
12521252 EXPECT_RAISES_WITH_MESSAGE_THAT (Invalid, testing::HasSubstr (" Invalid UTF8 sequence" ),
12531253 CallFunction (" utf8_lower" , {invalid_input}));
12541254}
@@ -1267,8 +1267,8 @@ TYPED_TEST(TestStringKernels, Utf8SwapCase) {
12671267 this ->CheckUnary (" utf8_swapcase" , " [\" hEllO, WoRld!\" , \" $. A35?\" ]" , this ->type (),
12681268 " [\" HeLLo, wOrLD!\" , \" $. a35?\" ]" );
12691269
1270- // Test invalid data
1271- auto invalid_input = ArrayFromJSON ( this ->type (), " [ \" Ⱥa\xFF Ɑ\ " , \ " Ɽ\xe1\xbd ⱤaA\" ] " );
1270+ // Test invalid data - use MakeArray since simdjson validates UTF-8 strictly
1271+ auto invalid_input = this ->MakeArray ({ " Ⱥa\xFF Ɑ" , " Ɽ\xe1\xbd ⱤaA" } );
12721272 EXPECT_RAISES_WITH_MESSAGE_THAT (Invalid, testing::HasSubstr (" Invalid UTF8 sequence" ),
12731273 CallFunction (" utf8_swapcase" , {invalid_input}));
12741274}
0 commit comments