test case 1: cycle_length = 1, block_length = 1.
| 96 | |
| 97 | // test case 1: cycle_length = 1, block_length = 1. |
| 98 | TestCase TestCase1() { |
| 99 | return { |
| 100 | /*input_tensors*/ |
| 101 | {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})}, |
| 102 | /*func*/ |
| 103 | MakeTensorSliceDatasetFunc( |
| 104 | DataTypeVector({DT_INT64}), |
| 105 | std::vector<PartialTensorShape>({PartialTensorShape({1})})), |
| 106 | /*func_lib*/ {test::function::MakeTensorSliceDataset()}, |
| 107 | /*cycle_length*/ |
| 108 | CreateTensor<int64>(TensorShape({}), {1}), |
| 109 | /*block_length*/ |
| 110 | CreateTensor<int64>(TensorShape({}), {1}), |
| 111 | /*expected_outputs*/ |
| 112 | ConvertToTensorVec<int64>({0, 1, 2, 3, 4, 5, 6, 7, 8}), |
| 113 | /*expected_output_dtypes*/ {DT_INT64}, |
| 114 | /*expected_output_shapes*/ {PartialTensorShape({1})}, |
| 115 | /*expected_cardinality*/ tensorflow::data::kUnknownCardinality, |
| 116 | /*breakpoints*/ {0, 4, 11}}; |
| 117 | } |
| 118 | |
| 119 | // test case 2: cycle_length = 2, block_length = 1. |
| 120 | TestCase TestCase2() { |
no test coverage detected