@@ -1578,7 +1578,7 @@ TEST_F(CommandLineInterfaceTest, InvalidMaximumEditionError) {
15781578Run (" protocol_compiler --proto_path=$tmpdir --test_out=$tmpdir foo.proto" );
15791579ExpectErrorSubstring (
15801580" generator --test_out specifies a maximum edition 99999_TEST_ONLY which"
1581- " is not the protoc maximum 2023 " );
1581+ " is not the protoc maximum" );
15821582}
15831583
15841584TEST_F (CommandLineInterfaceTest, InvalidFeatureExtensionError) {
@@ -2009,21 +2009,6 @@ TEST_F(CommandLineInterfaceTest, PluginErrorAndNoEditionsSupport) {
20092009" --plug_out: foo.proto: Saw message type MockCodeGenerator_Error." );
20102010}
20112011
2012- TEST_F (CommandLineInterfaceTest, AfterProtocMaximumEditionError) {
2013- CreateTempFile (" foo.proto" ,
2014- R"schema(
2015- edition = "2024";
2016- package foo;
2017- message Foo {
2018- }
2019- )schema" );
2020-
2021- Run (" protocol_compiler --proto_path=$tmpdir --test_out=$tmpdir foo.proto" );
2022- ExpectErrorSubstring (
2023- " foo.proto: is a file using edition 2024, which is later than the protoc"
2024- " maximum supported edition 2023." );
2025- }
2026-
20272012TEST_F (CommandLineInterfaceTest, AfterProtocMaximumEditionAllowlisted) {
20282013constexpr absl::string_view path =" google/protobuf" ;
20292014CreateTempFile (absl::StrCat (path," /foo.proto" ),
@@ -2083,52 +2068,66 @@ TEST_F(CommandLineInterfaceTest, EditionDefaults) {
20832068
20842069 FeatureSetDefaults defaults =ReadEditionDefaults (" defaults" );
20852070EXPECT_THAT (defaults,EqualsProto (R"pb(
2086- defaults {
2087- edition: EDITION_LEGACY
2088- overridable_features {}
2089- fixed_features {
2090- field_presence: EXPLICIT
2091- enum_type: CLOSED
2092- repeated_field_encoding: EXPANDED
2093- utf8_validation: NONE
2094- message_encoding: LENGTH_PREFIXED
2095- json_format: LEGACY_BEST_EFFORT
2096- enforce_naming_style: STYLE_LEGACY
2097- default_symbol_visibility: EXPORT_ALL
2098- }
2099- }
2100- defaults {
2101- edition: EDITION_PROTO3
2102- overridable_features {}
2103- fixed_features {
2104- field_presence: IMPLICIT
2105- enum_type: OPEN
2106- repeated_field_encoding: PACKED
2107- utf8_validation: VERIFY
2108- message_encoding: LENGTH_PREFIXED
2109- json_format: ALLOW
2110- enforce_naming_style: STYLE_LEGACY
2111- default_symbol_visibility: EXPORT_ALL
2112- }
2113- }
2114- defaults {
2115- edition: EDITION_2023
2116- overridable_features {
2117- field_presence: EXPLICIT
2118- enum_type: OPEN
2119- repeated_field_encoding: PACKED
2120- utf8_validation: VERIFY
2121- message_encoding: LENGTH_PREFIXED
2122- json_format: ALLOW
2123- }
2124- fixed_features {
2125- enforce_naming_style: STYLE_LEGACY
2126- default_symbol_visibility: EXPORT_ALL
2127- }
2128- }
2129- minimum_edition: EDITION_PROTO2
2130- maximum_edition: EDITION_2023
2131- )pb" ));
2071+ defaults {
2072+ edition: EDITION_LEGACY
2073+ overridable_features {}
2074+ fixed_features {
2075+ field_presence: EXPLICIT
2076+ enum_type: CLOSED
2077+ repeated_field_encoding: EXPANDED
2078+ utf8_validation: NONE
2079+ message_encoding: LENGTH_PREFIXED
2080+ json_format: LEGACY_BEST_EFFORT
2081+ enforce_naming_style: STYLE_LEGACY
2082+ default_symbol_visibility: EXPORT_ALL
2083+ }
2084+ }
2085+ defaults {
2086+ edition: EDITION_PROTO3
2087+ overridable_features {}
2088+ fixed_features {
2089+ field_presence: IMPLICIT
2090+ enum_type: OPEN
2091+ repeated_field_encoding: PACKED
2092+ utf8_validation: VERIFY
2093+ message_encoding: LENGTH_PREFIXED
2094+ json_format: ALLOW
2095+ enforce_naming_style: STYLE_LEGACY
2096+ default_symbol_visibility: EXPORT_ALL
2097+ }
2098+ }
2099+ defaults {
2100+ edition: EDITION_2023
2101+ overridable_features {
2102+ field_presence: EXPLICIT
2103+ enum_type: OPEN
2104+ repeated_field_encoding: PACKED
2105+ utf8_validation: VERIFY
2106+ message_encoding: LENGTH_PREFIXED
2107+ json_format: ALLOW
2108+ }
2109+ fixed_features {
2110+ enforce_naming_style: STYLE_LEGACY
2111+ default_symbol_visibility: EXPORT_ALL
2112+ }
2113+ }
2114+ defaults {
2115+ edition: EDITION_2024
2116+ overridable_features {
2117+ field_presence: EXPLICIT
2118+ enum_type: OPEN
2119+ repeated_field_encoding: PACKED
2120+ utf8_validation: VERIFY
2121+ message_encoding: LENGTH_PREFIXED
2122+ json_format: ALLOW
2123+ enforce_naming_style: STYLE2024
2124+ default_symbol_visibility: EXPORT_TOP_LEVEL
2125+ }
2126+ fixed_features {}
2127+ }
2128+ minimum_edition: EDITION_PROTO2
2129+ maximum_edition: EDITION_2024
2130+ )pb" ));
21322131}
21332132
21342133TEST_F (CommandLineInterfaceTest, EditionDefaultsWithMaximum) {