test case 5: cycle_length = 2, block_length = 2.
| 184 | |
| 185 | // test case 5: cycle_length = 2, block_length = 2. |
| 186 | TestCase TestCase5() { |
| 187 | return {/*input_tensors*/ |
| 188 | {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e", |
| 189 | "f", "g", "h", "i"})}, |
| 190 | /*func*/ |
| 191 | MakeTensorSliceDatasetFunc( |
| 192 | DataTypeVector({DT_STRING}), |
| 193 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 194 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 195 | /*cycle_length*/ |
| 196 | CreateTensor<int64>(TensorShape({}), {2}), |
| 197 | /*block_length*/ |
| 198 | CreateTensor<int64>(TensorShape({}), {2}), |
| 199 | /*expected_outputs*/ |
| 200 | ConvertToTensorVec<tstring>( |
| 201 | {"a", "b", "d", "e", "c", "f", "g", "h", "i"}), |
| 202 | /*expected_output_dtypes*/ {DT_STRING}, |
| 203 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 204 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 205 | /*breakpoints*/ {0, 4, 11}}; |
| 206 | } |
| 207 | |
| 208 | // test case 6: cycle_length = 2, block_length = 3. |
| 209 | TestCase TestCase6() { |
no test coverage detected