Test case 1: the input function has one output.
| 80 | |
| 81 | // Test case 1: the input function has one output. |
| 82 | TestCase TestCase1() { |
| 83 | return {/*range_data_param*/ {0, 10, 1}, |
| 84 | /*initial_state*/ |
| 85 | {CreateTensor<int64>(TensorShape({}), {0})}, |
| 86 | /*func*/ |
| 87 | FunctionDefHelper::FunctionRef("XAddY", {{"T", DT_INT64}}), |
| 88 | /*func_lib*/ {test::function::XAddY()}, |
| 89 | /*t_state*/ {DT_INT64}, |
| 90 | /*use_inter_op_parallelism*/ true, |
| 91 | /*expected_outputs*/ |
| 92 | {CreateTensor<int64>(TensorShape({}), {45})}, |
| 93 | /*output_dtypes*/ {DT_INT64}, |
| 94 | /*output_shapes*/ {PartialTensorShape({})}}; |
| 95 | } |
| 96 | |
| 97 | // Test case 2: the reduce function has two inputs and two outputs. As the |
| 98 | // number of components of initial_state need to match with the reduce function |
no test coverage detected