message: Lite: Util new test cases added to improve coverage
diff: @@ -51,6 +51,41 @@ TEST(UtilTest, IsFlexOp) {
  EXPECT_FALSE(IsFlexOp(""));
  }
  +TEST(EqualArrayAndTfLiteIntArray, TestWithTFLiteArrayEmpty) {
  + int input[] = {1, 2, 3, 4};
  + EXPECT_FALSE(EqualArrayAndTfLiteIntArray(nullptr, 4, input));
  +}
  +
  +TEST(EqualArrayAndTfLiteIntArray, TestWithTFLiteArrayWrongSize) {
  + int input[] = {1, 2, 3, 4};
  + TfLiteIntArray* output = ConvertArrayToTfLiteIntArray(4, input);
  + EXPECT_FALSE(EqualArrayAndTfLiteIntArray(output, 3, input));
  +}
  +
  +TEST(EqualArrayAndTfLiteIntArray, TestMismatch) {
  + int input[] = {1, 2, 3, 4};
  + TfLiteIntArray* output = ConvertVectorToTfLiteIntArray({1, 2, 2, 4});
  + EXPECT_FALSE(EqualArrayAndTfLiteIntArray(output, 4, input));
  +}
  +
  +TEST(EqualArrayAndTfLiteIntArray, TestMatch) {
  + int input[] = {1, 2, 3, 4};
  + TfLiteIntArray* output = ConvertArrayToTfLiteIntArray(4, input);
  + EXPECT_TRUE(EqualArrayAndTfLiteIntArray(output, 4, input));
  +}
  +
  +TEST(CombineHashes, TestHashOutputsEquals) {
  + size_t output1 = CombineHashes({1, 2, 3, 4});
  + size_t output2 = CombineHashes({1, 2, 3, 4});
  + EXPECT_EQ(output1, output2);
  +}
  +
  +TEST(CombineHashes, TestHashOutputsDifferent) {
  + size_t output1 = CombineHashes({1, 2, 3, 4});
  + size_t output2 = CombineHashes({1, 2, 2, 4});
  + EXPECT_NE(output1, output2);
  +}
  +
  } // namespace
  } // namespace tflite
  