| 96 | } |
| 97 | |
| 98 | TEST(Reshape, BatchIsUnsupported) { |
| 99 | TensorRef<BHWC> input; |
| 100 | input.type = DataType::FLOAT32; |
| 101 | input.ref = 0; |
| 102 | input.shape = BHWC(4, 1, 1, 1); |
| 103 | |
| 104 | TensorRef<BHWC> output; |
| 105 | output.type = DataType::FLOAT32; |
| 106 | output.ref = 1; |
| 107 | output.shape = BHWC(1, 2, 2, 1); |
| 108 | |
| 109 | ReshapeAttributes attr; |
| 110 | attr.new_shape = output.shape; |
| 111 | |
| 112 | SingleOpModel model({ToString(OperationType::RESHAPE), attr}, {input}, |
| 113 | {output}); |
| 114 | ASSERT_TRUE(model.PopulateTensor(0, {1, 2, 3, 4})); |
| 115 | ASSERT_THAT( |
| 116 | model.Invoke(*NewReshapeNodeShader()).message(), |
| 117 | testing::HasSubstr("Only identical batch dimension is supported")); |
| 118 | } |
| 119 | |
| 120 | } // namespace |
| 121 | } // namespace gl |
no test coverage detected