A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/protocolbuffers/protobuf/commit/26843b3c6064ca7114af971eb46bd6fe6cc9d200 below:

Enable edition 2024 support in protoc and language generators for cpp… · protocolbuffers/protobuf@26843b3 · GitHub

@@ -1578,7 +1578,7 @@ TEST_F(CommandLineInterfaceTest, InvalidMaximumEditionError) {

1578 1578

Run("protocol_compiler --proto_path=$tmpdir --test_out=$tmpdir foo.proto");

1579 1579

ExpectErrorSubstring(

1580 1580

"generator --test_out specifies a maximum edition 99999_TEST_ONLY which "

1581 -

"is not the protoc maximum 2023");

1581 +

"is not the protoc maximum");

1582 1582

}

1583 1583 1584 1584

TEST_F(CommandLineInterfaceTest, InvalidFeatureExtensionError) {

@@ -2009,21 +2009,6 @@ TEST_F(CommandLineInterfaceTest, PluginErrorAndNoEditionsSupport) {

2009 2009

"--plug_out: foo.proto: Saw message type MockCodeGenerator_Error.");

2010 2010

}

2011 2011 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 - 2027 2012

TEST_F(CommandLineInterfaceTest, AfterProtocMaximumEditionAllowlisted) {

2028 2013

constexpr absl::string_view path = "google/protobuf";

2029 2014

CreateTempFile(absl::StrCat(path, "/foo.proto"),

@@ -2083,52 +2068,66 @@ TEST_F(CommandLineInterfaceTest, EditionDefaults) {

2083 2068 2084 2069

FeatureSetDefaults defaults = ReadEditionDefaults("defaults");

2085 2070

EXPECT_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"));

2132 2131

}

2133 2132 2134 2133

TEST_F(CommandLineInterfaceTest, EditionDefaultsWithMaximum) {


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4