Test Case 7: num_shard is larger than the cardinality of input dataset; require_non_empty = false.
| 169 | // Test Case 7: num_shard is larger than the cardinality of input dataset; |
| 170 | // require_non_empty = false. |
| 171 | TestCase TestCase7() { |
| 172 | return {/*range_data_param*/ {0, 10, 1}, |
| 173 | /*num_shards*/ |
| 174 | CreateTensor<int64>(TensorShape({}), {20}), |
| 175 | /*index*/ |
| 176 | CreateTensor<int64>(TensorShape({}), {5}), |
| 177 | /*require_non_empty*/ false, |
| 178 | /*expected_outputs*/ |
| 179 | {CreateTensor<int64>(TensorShape({}), {5})}, |
| 180 | /*expected_output_dtypes*/ {DT_INT64}, |
| 181 | /*expected_output_shapes*/ {PartialTensorShape({})}, |
| 182 | /*expected_cardinality*/ 1, |
| 183 | /*breakpoints*/ {0, 5}}; |
| 184 | } |
| 185 | |
| 186 | // Test Case 8: similar with test_case_7 but require_non_empty = true. |
| 187 | TestCase NoElemForEachShardTestCase() { |
no test coverage detected