| 31 | namespace { |
| 32 | |
| 33 | TEST(ModelUtilsTest, QuantizationParametersExist) { |
| 34 | TensorT tensor; |
| 35 | tensor.quantization = absl::make_unique<QuantizationParametersT>(); |
| 36 | tensor.quantization->scale.push_back(0.5); |
| 37 | tensor.quantization->scale.push_back(1.5); |
| 38 | EXPECT_FALSE(QuantizationParametersExist(&tensor)); |
| 39 | tensor.quantization->zero_point.push_back(1); |
| 40 | tensor.quantization->zero_point.push_back(-1); |
| 41 | EXPECT_TRUE(QuantizationParametersExist(&tensor)); |
| 42 | } |
| 43 | |
| 44 | TEST(ModelUtilsTest, HasBuffer) { |
| 45 | tflite::ModelT model; |
nothing calls this directly
no test coverage detected