Let eager parsing determine true parsing error on DiscardRemainingTag.

PiperOrigin-RevId: 554604752
pull/13463/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 0cf1ea48d4
commit 3428c881cd
  1. 7
      src/google/protobuf/message_unittest.inc

@ -1017,6 +1017,13 @@ TEST(MESSAGE_TEST_NAME, MessageIsStillValidAfterParseFails) {
}
}
TEST(MESSAGE_TEST_NAME, NonCanonicalTag) {
UNITTEST::TestAllTypes message;
// optional_lazy_message (27) LEN(3) with non canonical tag: (1).
const char encoded[] = {'\332', 1, 3, '\210', 0, 0};
EXPECT_TRUE(message.ParseFromArray(encoded, sizeof(encoded)));
}
namespace {

Loading…
Cancel
Save