test case 4: cycle_length = 5, block_length = 1.
| 162 | |
| 163 | // test case 4: cycle_length = 5, block_length = 1. |
| 164 | TestCase TestCase4() { |
| 165 | return { |
| 166 | /*input_tensors*/ |
| 167 | {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})}, |
| 168 | /*func*/ |
| 169 | MakeTensorSliceDatasetFunc( |
| 170 | DataTypeVector({DT_INT64}), |
| 171 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 172 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 173 | /*cycle_length*/ |
| 174 | CreateTensor<int64>(TensorShape({}), {3}), |
| 175 | /*block_length*/ |
| 176 | CreateTensor<int64>(TensorShape({}), {1}), |
| 177 | /*expected_outputs*/ |
| 178 | ConvertToTensorVec<int64>({0, 3, 6, 1, 4, 7, 2, 5, 8}), |
| 179 | /*expected_output_dtypes*/ {DT_INT64}, |
| 180 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 181 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 182 | /*breakpoints*/ {0, 4, 11}}; |
| 183 | } |
| 184 | |
| 185 | // test case 5: cycle_length = 2, block_length = 2. |
| 186 | TestCase TestCase5() { |
no test coverage detected