test case 2: cycle_length = 2, block_length = 1.
| 118 | |
| 119 | // test case 2: cycle_length = 2, block_length = 1. |
| 120 | TestCase TestCase2() { |
| 121 | return { |
| 122 | /*input_tensors*/ |
| 123 | {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})}, |
| 124 | /*func*/ |
| 125 | MakeTensorSliceDatasetFunc( |
| 126 | DataTypeVector({DT_INT64}), |
| 127 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 128 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 129 | /*cycle_length*/ |
| 130 | CreateTensor<int64>(TensorShape({}), {2}), |
| 131 | /*block_length*/ |
| 132 | CreateTensor<int64>(TensorShape({}), {1}), |
| 133 | /*expected_outputs*/ |
| 134 | ConvertToTensorVec<int64>({0, 3, 1, 4, 2, 5, 6, 7, 8}), |
| 135 | /*expected_output_dtypes*/ {DT_INT64}, |
| 136 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 137 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 138 | /*breakpoints*/ {0, 4, 11}}; |
| 139 | } |
| 140 | |
| 141 | // test case 3: cycle_length = 3, block_length = 1. |
| 142 | TestCase TestCase3() { |
no test coverage detected