test case 6: cycle_length = 2, block_length = 3.
| 207 | |
| 208 | // test case 6: cycle_length = 2, block_length = 3. |
| 209 | TestCase TestCase6() { |
| 210 | return {/*input_tensors*/ |
| 211 | {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e", |
| 212 | "f", "g", "h", "i"})}, |
| 213 | /*func*/ |
| 214 | MakeTensorSliceDatasetFunc( |
| 215 | DataTypeVector({DT_STRING}), |
| 216 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 217 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 218 | /*cycle_length*/ |
| 219 | CreateTensor<int64>(TensorShape({}), {2}), |
| 220 | /*block_length*/ |
| 221 | CreateTensor<int64>(TensorShape({}), {3}), |
| 222 | /*expected_outputs*/ |
| 223 | ConvertToTensorVec<tstring>( |
| 224 | {"a", "b", "c", "d", "e", "f", "g", "h", "i"}), |
| 225 | /*expected_output_dtypes*/ {DT_STRING}, |
| 226 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 227 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 228 | /*breakpoints*/ {0, 4, 11}}; |
| 229 | } |
| 230 | |
| 231 | // test case 7: cycle_length = 2, block_length = 5. |
| 232 | TestCase TestCase7() { |
no test coverage detected