Test case 1: size=2, shift=2, stride=1, drop_remainder=false.
| 69 | |
| 70 | // Test case 1: size=2, shift=2, stride=1, drop_remainder=false. |
| 71 | TestCase TestCase1() { |
| 72 | return {/*range_data_param*/ {0, 7, 1}, |
| 73 | /*size*/ CreateTensor<int64>(TensorShape({}), {2}), |
| 74 | /*shift*/ CreateTensor<int64>(TensorShape({}), {2}), |
| 75 | /*stride*/ CreateTensor<int64>(TensorShape({}), {1}), |
| 76 | /*drop_remainder*/ |
| 77 | CreateTensor<bool>(TensorShape({}), {false}), |
| 78 | /*expected_outputs*/ |
| 79 | {{CreateTensor<int64>(TensorShape({}), {0}), |
| 80 | CreateTensor<int64>(TensorShape({}), {1})}, |
| 81 | {CreateTensor<int64>(TensorShape({}), {2}), |
| 82 | CreateTensor<int64>(TensorShape({}), {3})}, |
| 83 | {CreateTensor<int64>(TensorShape({}), {4}), |
| 84 | CreateTensor<int64>(TensorShape({}), {5})}, |
| 85 | {CreateTensor<int64>(TensorShape({}), {6})}}, |
| 86 | /*expected_output_dtypes*/ {DT_VARIANT}, |
| 87 | /*expected_output_shapes*/ {PartialTensorShape({})}, |
| 88 | /*expected_cardinality*/ 4, |
| 89 | /*breakpoints*/ {0, 1, 9}}; |
| 90 | } |
| 91 | |
| 92 | // Test case 2: size=2, shift=2, stride=2, drop_remainder=true. |
| 93 | TestCase TestCase2() { |
no test coverage detected