Ensure that the range of valid editions is always dense.

PiperOrigin-RevId: 574302947
pull/14421/head
Mike Kruskal 1 year ago committed by Copybara-Service
parent 8c80a3265d
commit cb86ad6d81
  1. 7
      src/google/protobuf/descriptor_unittest.cc

@ -7217,6 +7217,13 @@ TEST_F(ValidationErrorTest, UnusedImportWithOtherError) {
"foo.proto: Foo.foo: EXTENDEE: \"Baz\" is not defined.\n");
}
TEST(EditionsTest, DenseRange) {
for (int i = static_cast<int>(PROTOBUF_MINIMUM_EDITION);
i <= static_cast<int>(PROTOBUF_MAXIMUM_EDITION); ++i) {
EXPECT_TRUE(Edition_IsValid(i));
}
}
using FeaturesBaseTest = ValidationErrorTest;
class FeaturesTest : public FeaturesBaseTest {

Loading…
Cancel
Save