| 24 | namespace { |
| 25 | |
| 26 | TEST(DelegateDataTest, Basic) { |
| 27 | DelegateData data; |
| 28 | // We only check for success because it is hard to make initialization fail. |
| 29 | // It only happens if we manage to not link the CPU device factory into the |
| 30 | // binary. |
| 31 | tensorflow::SessionOptions session_options; |
| 32 | session_options.config.set_intra_op_parallelism_threads(2); |
| 33 | EXPECT_TRUE(data.Prepare(session_options).ok()); |
| 34 | |
| 35 | TfLiteContext dummy_context1 = {}; |
| 36 | TfLiteContext dummy_context2 = {}; |
| 37 | EXPECT_NE(data.GetEagerContext(), nullptr); |
| 38 | EXPECT_NE(data.GetBufferMap(&dummy_context1), nullptr); |
| 39 | EXPECT_NE(data.GetBufferMap(&dummy_context1), |
| 40 | data.GetBufferMap(&dummy_context2)); |
| 41 | } |
| 42 | |
| 43 | } // namespace |
| 44 | } // namespace flex |
nothing calls this directly
no test coverage detected