@@ -2702,12 +2702,18 @@ TYPED_TEST(TestBinaryKernels, SliceBytesBasic) {
27022702}
27032703
27042704TYPED_TEST (TestBinaryKernels, SliceBytesPosPos) {
2705+ constexpr auto max = std::numeric_limits<int64_t >::max ();
27052706 SliceOptions options_default_stop{/* start=*/ 1 };
27062707 const std::string long_input (300 , ' x' );
27072708 this ->CheckUnary (
27082709 " binary_slice" , this ->template MakeArray <std::string>({" abcdef" , long_input}),
27092710 this ->template MakeArray <std::string>({" bcdef" , std::string (299 , ' x' )}),
27102711 &options_default_stop);
2712+ SliceOptions options_default_stop_step{/* start=*/ 1 , /* stop=*/ max, /* step=*/ 5 };
2713+ this ->CheckUnary (" binary_slice" ,
2714+ this ->template MakeArray <std::string>({" abcdef" , long_input}),
2715+ this ->template MakeArray <std::string>({" b" , std::string (60 , ' x' )}),
2716+ &options_default_stop_step);
27112717
27122718 SliceOptions options{2 , 4 };
27132719 this ->CheckUnary (
@@ -2755,6 +2761,18 @@ TYPED_TEST(TestBinaryKernels, SliceBytesPosNeg) {
27552761}
27562762
27572763TYPED_TEST (TestBinaryKernels, SliceBytesNegNeg) {
2764+ constexpr auto min = std::numeric_limits<int64_t >::min ();
2765+ const std::string long_input (300 , ' x' );
2766+ SliceOptions options_min{/* start=*/ -1 , /* stop=*/ min};
2767+ this ->CheckUnary (" binary_slice" ,
2768+ this ->template MakeArray <std::string>({" abcdef" , long_input}),
2769+ this ->template MakeArray <std::string>({" " , " " }), &options_min);
2770+ SliceOptions options_min_step_neg{/* start=*/ -1 , /* stop=*/ min, /* step=*/ -5 };
2771+ this ->CheckUnary (" binary_slice" ,
2772+ this ->template MakeArray <std::string>({" abcdef" , long_input}),
2773+ this ->template MakeArray <std::string>({" fa" , std::string (60 , ' x' )}),
2774+ &options_min_step_neg);
2775+
27582776 SliceOptions options{-2 , -1 };
27592777 this ->CheckUnary (
27602778 " binary_slice" ,
0 commit comments