| 63 | }; |
| 64 | |
| 65 | TEST_F(SubgraphBuilderTest, TestBuildAddSubgraph) { |
| 66 | builder_->BuildAddSubgraph(&interpreter_->primary_subgraph()); |
| 67 | |
| 68 | interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {2}); |
| 69 | interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {1, 2}); |
| 70 | ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); |
| 71 | |
| 72 | FillIntTensor(interpreter_->tensor(interpreter_->inputs()[0]), {5, 7}); |
| 73 | FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {1, 2}); |
| 74 | ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); |
| 75 | |
| 76 | TfLiteTensor* output = interpreter_->tensor(interpreter_->outputs()[0]); |
| 77 | CheckIntTensor(output, {1, 2}, {6, 9}); |
| 78 | } |
| 79 | |
| 80 | TEST_F(SubgraphBuilderTest, TestBuildMulSubgraph) { |
| 81 | builder_->BuildMulSubgraph(&interpreter_->primary_subgraph()); |
nothing calls this directly
no test coverage detected