Fix BufferAndPlanClearingTest

Properly instantiate this parameterized test target.

PiperOrigin-RevId: 312543593
Change-Id: I4a104c8f0ffff30e79bdc0b0f9c89ae30ca4c34e
This commit is contained in:
Jared Duke 2020-05-20 13:25:50 -07:00 committed by TensorFlower Gardener
parent e510776645
commit a66070b184
2 changed files with 5 additions and 0 deletions

View File

@ -136,6 +136,8 @@ TfLiteStatus SimpleMemoryArena::ResolveAlloc(
char** output_ptr) {
TF_LITE_ENSURE(context, committed_);
TF_LITE_ENSURE(context, output_ptr != nullptr);
TF_LITE_ENSURE(context,
underlying_buffer_size_ >= (alloc.offset + alloc.size));
if (alloc.size == 0) {
*output_ptr = nullptr;
} else {

View File

@ -197,6 +197,9 @@ TEST_P(BufferAndPlanClearingTest, TestClearBufferAndClearPlan) {
EXPECT_NE(resolved_ptr, nullptr);
}
INSTANTIATE_TEST_SUITE_P(BufferAndPlanClearingTest, BufferAndPlanClearingTest,
::testing::Values(true, false));
} // namespace
} // namespace tflite