test case 3: cycle_length = 3, block_length = 1.
| 140 | |
| 141 | // test case 3: cycle_length = 3, block_length = 1. |
| 142 | TestCase TestCase3() { |
| 143 | return { |
| 144 | /*input_tensors*/ |
| 145 | {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})}, |
| 146 | /*func*/ |
| 147 | MakeTensorSliceDatasetFunc( |
| 148 | DataTypeVector({DT_INT64}), |
| 149 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 150 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 151 | /*cycle_length*/ |
| 152 | CreateTensor<int64>(TensorShape({}), {3}), |
| 153 | /*block_length*/ |
| 154 | CreateTensor<int64>(TensorShape({}), {1}), |
| 155 | /*expected_outputs*/ |
| 156 | ConvertToTensorVec<int64>({0, 3, 6, 1, 4, 7, 2, 5, 8}), |
| 157 | /*expected_output_dtypes*/ {DT_INT64}, |
| 158 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 159 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 160 | /*breakpoints*/ {0, 4, 11}}; |
| 161 | } |
| 162 | |
| 163 | // test case 4: cycle_length = 5, block_length = 1. |
| 164 | TestCase TestCase4() { |
no test coverage detected