| 372 | } |
| 373 | |
| 374 | void CheckIntTensor(const TfLiteTensor* tensor, const std::vector<int>& shape, |
| 375 | const std::vector<int32_t>& data) { |
| 376 | ASSERT_EQ(tensor->dims->size, shape.size()); |
| 377 | for (int i = 0; i < tensor->dims->size; ++i) { |
| 378 | ASSERT_EQ(tensor->dims->data[i], shape[i]); |
| 379 | } |
| 380 | ASSERT_EQ(tensor->type, kTfLiteInt32); |
| 381 | int count = NumElements(tensor); |
| 382 | ASSERT_EQ(count, data.size()); |
| 383 | for (int i = 0; i < count; ++i) { |
| 384 | EXPECT_EQ(tensor->data.i32[i], data[i]); |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | void CheckBoolTensor(const TfLiteTensor* tensor, const std::vector<int>& shape, |
| 389 | const std::vector<bool>& data) { |
no test coverage detected