| 33 | } |
| 34 | |
| 35 | TEST(CApiExperimentalTest, Smoke) { |
| 36 | TfLiteModel* model = |
| 37 | TfLiteModelCreateFromFile("tensorflow/lite/testdata/add.bin"); |
| 38 | ASSERT_NE(model, nullptr); |
| 39 | |
| 40 | TfLiteInterpreterOptions* options = TfLiteInterpreterOptionsCreate(); |
| 41 | TfLiteInterpreterOptionsAddBuiltinOp(options, kTfLiteBuiltinAdd, |
| 42 | GetDummyRegistration(), 1, 1); |
| 43 | |
| 44 | TfLiteInterpreter* interpreter = TfLiteInterpreterCreate(model, options); |
| 45 | ASSERT_NE(interpreter, nullptr); |
| 46 | ASSERT_EQ(TfLiteInterpreterAllocateTensors(interpreter), kTfLiteOk); |
| 47 | EXPECT_EQ(TfLiteInterpreterResetVariableTensors(interpreter), kTfLiteOk); |
| 48 | EXPECT_EQ(TfLiteInterpreterInvoke(interpreter), kTfLiteOk); |
| 49 | |
| 50 | TfLiteInterpreterDelete(interpreter); |
| 51 | TfLiteInterpreterOptionsDelete(options); |
| 52 | TfLiteModelDelete(model); |
| 53 | } |
| 54 | |
| 55 | } // namespace |
| 56 |
nothing calls this directly
no test coverage detected