test case 7: cycle_length = 2, block_length = 5.
| 230 | |
| 231 | // test case 7: cycle_length = 2, block_length = 5. |
| 232 | TestCase TestCase7() { |
| 233 | return {/*input_tensors*/ |
| 234 | {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e", |
| 235 | "f", "g", "h", "i"})}, |
| 236 | /*func*/ |
| 237 | MakeTensorSliceDatasetFunc( |
| 238 | DataTypeVector({DT_STRING}), |
| 239 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 240 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 241 | /*cycle_length*/ |
| 242 | CreateTensor<int64>(TensorShape({}), {2}), |
| 243 | /*block_length*/ |
| 244 | CreateTensor<int64>(TensorShape({}), {5}), |
| 245 | /*expected_outputs*/ |
| 246 | ConvertToTensorVec<tstring>( |
| 247 | {"a", "b", "c", "d", "e", "f", "g", "h", "i"}), |
| 248 | /*expected_output_dtypes*/ {DT_STRING}, |
| 249 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 250 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 251 | /*breakpoints*/ {0, 4, 11}}; |
| 252 | } |
| 253 | |
| 254 | // test case 8: cycle_length = 0, block_length = 5. |
| 255 | TestCase InvalidCycleLengthTestCase() { |
no test coverage detected