Rename UNVERIFIED utf8 validation option to NONE

PiperOrigin-RevId: 573375994
pull/14398/head
Mike Kruskal 1 year ago committed by Copybara-Service
parent c863cfcaf7
commit 512f19d406
  1. 2
      src/google/protobuf/compiler/code_generator_unittest.cc
  2. 6
      src/google/protobuf/compiler/command_line_interface_unittest.cc
  3. 108
      src/google/protobuf/descriptor.pb.cc
  4. 4
      src/google/protobuf/descriptor.pb.h
  5. 4
      src/google/protobuf/descriptor.proto
  6. 22
      src/google/protobuf/descriptor_unittest.cc
  7. 2
      src/google/protobuf/editions/golden/editions_transform_proto2.proto
  8. 2
      src/google/protobuf/editions/golden/editions_transform_proto2_lite.proto
  9. 2
      src/google/protobuf/editions/golden/editions_transform_proto2_utf8_disabled.proto
  10. 2
      src/google/protobuf/editions/golden/test_messages_proto2.proto
  11. 2
      src/google/protobuf/feature_resolver_test.cc
  12. 2
      upb/reflection/stage0/google/protobuf/descriptor.upb.h

@ -269,7 +269,7 @@ TEST_F(CodeGeneratorTest, BuildFeatureSetDefaults) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
} }

@ -1753,7 +1753,7 @@ TEST_F(CommandLineInterfaceTest, EditionDefaults) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
} }
@ -1802,7 +1802,7 @@ TEST_F(CommandLineInterfaceTest, EditionDefaultsWithMaximum) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
} }
@ -1852,7 +1852,7 @@ TEST_F(CommandLineInterfaceTest, EditionDefaultsWithMinimum) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
} }

@ -1838,7 +1838,7 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR
"e\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_" "e\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_"
"value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010" "value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010"
"NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extens" "NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extens"
"ion\030\002 \002(\010\"\251\t\n\nFeatureSet\022|\n\016field_presen" "ion\030\002 \002(\010\"\235\t\n\nFeatureSet\022|\n\016field_presen"
"ce\030\001 \001(\0162).google.protobuf.FeatureSet.Fi" "ce\030\001 \001(\0162).google.protobuf.FeatureSet.Fi"
"eldPresenceB9\210\001\001\230\001\004\230\001\001\242\001\r\022\010EXPLICIT\030\346\007\242\001" "eldPresenceB9\210\001\001\230\001\004\230\001\001\242\001\r\022\010EXPLICIT\030\346\007\242\001"
"\r\022\010IMPLICIT\030\347\007\242\001\r\022\010EXPLICIT\030\350\007\022\\\n\tenum_t" "\r\022\010IMPLICIT\030\347\007\242\001\r\022\010EXPLICIT\030\350\007\022\\\n\tenum_t"
@ -1847,63 +1847,63 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR
"N\030\347\007\022{\n\027repeated_field_encoding\030\003 \001(\01621." "N\030\347\007\022{\n\027repeated_field_encoding\030\003 \001(\01621."
"google.protobuf.FeatureSet.RepeatedField" "google.protobuf.FeatureSet.RepeatedField"
"EncodingB\'\210\001\001\230\001\004\230\001\001\242\001\r\022\010EXPANDED\030\346\007\242\001\013\022\006" "EncodingB\'\210\001\001\230\001\004\230\001\001\242\001\r\022\010EXPANDED\030\346\007\242\001\013\022\006"
"PACKED\030\347\007\022n\n\017utf8_validation\030\004 \001(\0162*.goo" "PACKED\030\347\007\022h\n\017utf8_validation\030\004 \001(\0162*.goo"
"gle.protobuf.FeatureSet.Utf8ValidationB)" "gle.protobuf.FeatureSet.Utf8ValidationB#"
"\210\001\001\230\001\004\230\001\001\242\001\017\022\nUNVERIFIED\030\346\007\242\001\013\022\006VERIFY\030\347" "\210\001\001\230\001\004\230\001\001\242\001\t\022\004NONE\030\346\007\242\001\013\022\006VERIFY\030\347\007\022g\n\020m"
"\007\022g\n\020message_encoding\030\005 \001(\0162+.google.pro" "essage_encoding\030\005 \001(\0162+.google.protobuf."
"tobuf.FeatureSet.MessageEncodingB \210\001\001\230\001\004" "FeatureSet.MessageEncodingB \210\001\001\230\001\004\230\001\001\242\001\024"
"\230\001\001\242\001\024\022\017LENGTH_PREFIXED\030\346\007\022p\n\013json_forma" "\022\017LENGTH_PREFIXED\030\346\007\022p\n\013json_format\030\006 \001("
"t\030\006 \001(\0162&.google.protobuf.FeatureSet.Jso" "\0162&.google.protobuf.FeatureSet.JsonForma"
"nFormatB3\210\001\001\230\001\003\230\001\006\230\001\001\242\001\027\022\022LEGACY_BEST_EF" "tB3\210\001\001\230\001\003\230\001\006\230\001\001\242\001\027\022\022LEGACY_BEST_EFFORT\030\346"
"FORT\030\346\007\242\001\n\022\005ALLOW\030\347\007\"\\\n\rFieldPresence\022\032\n" "\007\242\001\n\022\005ALLOW\030\347\007\"\\\n\rFieldPresence\022\032\n\026FIELD"
"\026FIELD_PRESENCE_UNKNOWN\020\000\022\014\n\010EXPLICIT\020\001\022" "_PRESENCE_UNKNOWN\020\000\022\014\n\010EXPLICIT\020\001\022\014\n\010IMP"
"\014\n\010IMPLICIT\020\002\022\023\n\017LEGACY_REQUIRED\020\003\"7\n\010En" "LICIT\020\002\022\023\n\017LEGACY_REQUIRED\020\003\"7\n\010EnumType"
"umType\022\025\n\021ENUM_TYPE_UNKNOWN\020\000\022\010\n\004OPEN\020\001\022" "\022\025\n\021ENUM_TYPE_UNKNOWN\020\000\022\010\n\004OPEN\020\001\022\n\n\006CLO"
"\n\n\006CLOSED\020\002\"V\n\025RepeatedFieldEncoding\022#\n\037" "SED\020\002\"V\n\025RepeatedFieldEncoding\022#\n\037REPEAT"
"REPEATED_FIELD_ENCODING_UNKNOWN\020\000\022\n\n\006PAC" "ED_FIELD_ENCODING_UNKNOWN\020\000\022\n\n\006PACKED\020\001\022"
"KED\020\001\022\014\n\010EXPANDED\020\002\"I\n\016Utf8Validation\022\033\n" "\014\n\010EXPANDED\020\002\"C\n\016Utf8Validation\022\033\n\027UTF8_"
"\027UTF8_VALIDATION_UNKNOWN\020\000\022\016\n\nUNVERIFIED" "VALIDATION_UNKNOWN\020\000\022\010\n\004NONE\020\001\022\n\n\006VERIFY"
"\020\001\022\n\n\006VERIFY\020\002\"S\n\017MessageEncoding\022\034\n\030MES" "\020\002\"S\n\017MessageEncoding\022\034\n\030MESSAGE_ENCODIN"
"SAGE_ENCODING_UNKNOWN\020\000\022\023\n\017LENGTH_PREFIX" "G_UNKNOWN\020\000\022\023\n\017LENGTH_PREFIXED\020\001\022\r\n\tDELI"
"ED\020\001\022\r\n\tDELIMITED\020\002\"H\n\nJsonFormat\022\027\n\023JSO" "MITED\020\002\"H\n\nJsonFormat\022\027\n\023JSON_FORMAT_UNK"
"N_FORMAT_UNKNOWN\020\000\022\t\n\005ALLOW\020\001\022\026\n\022LEGACY_" "NOWN\020\000\022\t\n\005ALLOW\020\001\022\026\n\022LEGACY_BEST_EFFORT\020"
"BEST_EFFORT\020\002*\006\010\350\007\020\351\007*\006\010\351\007\020\352\007*\006\010\213N\020\220NJ\006\010" "\002*\006\010\350\007\020\351\007*\006\010\351\007\020\352\007*\006\010\213N\020\220NJ\006\010\347\007\020\350\007\"\300\002\n\022Fe"
"\347\007\020\350\007\"\300\002\n\022FeatureSetDefaults\022N\n\010defaults" "atureSetDefaults\022N\n\010defaults\030\001 \003(\0132<.goo"
"\030\001 \003(\0132<.google.protobuf.FeatureSetDefau" "gle.protobuf.FeatureSetDefaults.FeatureS"
"lts.FeatureSetEditionDefault\0221\n\017minimum_" "etEditionDefault\0221\n\017minimum_edition\030\004 \001("
"edition\030\004 \001(\0162\030.google.protobuf.Edition\022" "\0162\030.google.protobuf.Edition\0221\n\017maximum_e"
"1\n\017maximum_edition\030\005 \001(\0162\030.google.protob" "dition\030\005 \001(\0162\030.google.protobuf.Edition\032t"
"uf.Edition\032t\n\030FeatureSetEditionDefault\022)" "\n\030FeatureSetEditionDefault\022)\n\007edition\030\003 "
"\n\007edition\030\003 \001(\0162\030.google.protobuf.Editio" "\001(\0162\030.google.protobuf.Edition\022-\n\010feature"
"n\022-\n\010features\030\002 \001(\0132\033.google.protobuf.Fe" "s\030\002 \001(\0132\033.google.protobuf.FeatureSet\"\325\001\n"
"atureSet\"\325\001\n\016SourceCodeInfo\022:\n\010location\030" "\016SourceCodeInfo\022:\n\010location\030\001 \003(\0132(.goog"
"\001 \003(\0132(.google.protobuf.SourceCodeInfo.L" "le.protobuf.SourceCodeInfo.Location\032\206\001\n\010"
"ocation\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020" "Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005"
"\n\004span\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001" "B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031\n\021traili"
"(\t\022\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading" "ng_comments\030\004 \001(\t\022!\n\031leading_detached_co"
"_detached_comments\030\006 \003(\t\"\234\002\n\021GeneratedCo" "mments\030\006 \003(\t\"\234\002\n\021GeneratedCodeInfo\022A\n\nan"
"deInfo\022A\n\nannotation\030\001 \003(\0132-.google.prot" "notation\030\001 \003(\0132-.google.protobuf.Generat"
"obuf.GeneratedCodeInfo.Annotation\032\303\001\n\nAn" "edCodeInfo.Annotation\032\303\001\n\nAnnotation\022\020\n\004"
"notation\022\020\n\004path\030\001 \003(\005B\002\020\001\022\023\n\013source_fil" "path\030\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005b"
"e\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010s" "egin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010semantic\030\005 \001("
"emantic\030\005 \001(\01626.google.protobuf.Generate" "\01626.google.protobuf.GeneratedCodeInfo.An"
"dCodeInfo.Annotation.Semantic\"(\n\010Semanti" "notation.Semantic\"(\n\010Semantic\022\010\n\004NONE\020\000\022"
"c\022\010\n\004NONE\020\000\022\007\n\003SET\020\001\022\t\n\005ALIAS\020\002*\352\001\n\007Edit" "\007\n\003SET\020\001\022\t\n\005ALIAS\020\002*\352\001\n\007Edition\022\023\n\017EDITI"
"ion\022\023\n\017EDITION_UNKNOWN\020\000\022\023\n\016EDITION_PROT" "ON_UNKNOWN\020\000\022\023\n\016EDITION_PROTO2\020\346\007\022\023\n\016EDI"
"O2\020\346\007\022\023\n\016EDITION_PROTO3\020\347\007\022\021\n\014EDITION_20" "TION_PROTO3\020\347\007\022\021\n\014EDITION_2023\020\350\007\022\027\n\023EDI"
"23\020\350\007\022\027\n\023EDITION_1_TEST_ONLY\020\001\022\027\n\023EDITIO" "TION_1_TEST_ONLY\020\001\022\027\n\023EDITION_2_TEST_ONL"
"N_2_TEST_ONLY\020\002\022\035\n\027EDITION_99997_TEST_ON" "Y\020\002\022\035\n\027EDITION_99997_TEST_ONLY\020\235\215\006\022\035\n\027ED"
"LY\020\235\215\006\022\035\n\027EDITION_99998_TEST_ONLY\020\236\215\006\022\035\n" "ITION_99998_TEST_ONLY\020\236\215\006\022\035\n\027EDITION_999"
"\027EDITION_99999_TEST_ONLY\020\237\215\006B~\n\023com.goog" "99_TEST_ONLY\020\237\215\006B~\n\023com.google.protobufB"
"le.protobufB\020DescriptorProtosH\001Z-google." "\020DescriptorProtosH\001Z-google.golang.org/p"
"golang.org/protobuf/types/descriptorpb\370\001" "rotobuf/types/descriptorpb\370\001\001\242\002\003GPB\252\002\032Go"
"\001\242\002\003GPB\252\002\032Google.Protobuf.Reflection" "ogle.Protobuf.Reflection"
}; };
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once; static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = {
false, false,
false, false,
9556, 9544,
descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto,
"google/protobuf/descriptor.proto", "google/protobuf/descriptor.proto",
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
@ -2266,7 +2266,7 @@ bool FeatureSet_Utf8Validation_IsValid(int value) {
(!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FeatureSet_Utf8Validation FeatureSet::UTF8_VALIDATION_UNKNOWN; constexpr FeatureSet_Utf8Validation FeatureSet::UTF8_VALIDATION_UNKNOWN;
constexpr FeatureSet_Utf8Validation FeatureSet::UNVERIFIED; constexpr FeatureSet_Utf8Validation FeatureSet::NONE;
constexpr FeatureSet_Utf8Validation FeatureSet::VERIFY; constexpr FeatureSet_Utf8Validation FeatureSet::VERIFY;
constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MIN; constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MIN;
constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MAX; constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MAX;

@ -548,7 +548,7 @@ inline bool FeatureSet_RepeatedFieldEncoding_Parse(absl::string_view name, Featu
} }
enum FeatureSet_Utf8Validation : int { enum FeatureSet_Utf8Validation : int {
FeatureSet_Utf8Validation_UTF8_VALIDATION_UNKNOWN = 0, FeatureSet_Utf8Validation_UTF8_VALIDATION_UNKNOWN = 0,
FeatureSet_Utf8Validation_UNVERIFIED = 1, FeatureSet_Utf8Validation_NONE = 1,
FeatureSet_Utf8Validation_VERIFY = 2, FeatureSet_Utf8Validation_VERIFY = 2,
}; };
@ -1827,7 +1827,7 @@ class PROTOBUF_EXPORT FeatureSet final :
using Utf8Validation = FeatureSet_Utf8Validation; using Utf8Validation = FeatureSet_Utf8Validation;
static constexpr Utf8Validation UTF8_VALIDATION_UNKNOWN = FeatureSet_Utf8Validation_UTF8_VALIDATION_UNKNOWN; static constexpr Utf8Validation UTF8_VALIDATION_UNKNOWN = FeatureSet_Utf8Validation_UTF8_VALIDATION_UNKNOWN;
static constexpr Utf8Validation UNVERIFIED = FeatureSet_Utf8Validation_UNVERIFIED; static constexpr Utf8Validation NONE = FeatureSet_Utf8Validation_NONE;
static constexpr Utf8Validation VERIFY = FeatureSet_Utf8Validation_VERIFY; static constexpr Utf8Validation VERIFY = FeatureSet_Utf8Validation_VERIFY;
static inline bool Utf8Validation_IsValid(int value) { static inline bool Utf8Validation_IsValid(int value) {
return FeatureSet_Utf8Validation_IsValid(value); return FeatureSet_Utf8Validation_IsValid(value);

@ -974,14 +974,14 @@ message FeatureSet {
enum Utf8Validation { enum Utf8Validation {
UTF8_VALIDATION_UNKNOWN = 0; UTF8_VALIDATION_UNKNOWN = 0;
UNVERIFIED = 1; NONE = 1;
VERIFY = 2; VERIFY = 2;
} }
optional Utf8Validation utf8_validation = 4 [ optional Utf8Validation utf8_validation = 4 [
retention = RETENTION_RUNTIME, retention = RETENTION_RUNTIME,
targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FIELD,
targets = TARGET_TYPE_FILE, targets = TARGET_TYPE_FILE,
edition_defaults = { edition: EDITION_PROTO2, value: "UNVERIFIED" }, edition_defaults = { edition: EDITION_PROTO2, value: "NONE" },
edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" } edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }
]; ];

@ -7317,7 +7317,7 @@ TEST_F(FeaturesTest, Proto2Features) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
[pb.cpp] { legacy_closed_enum: true })pb")); [pb.cpp] { legacy_closed_enum: true })pb"));
@ -7325,7 +7325,7 @@ TEST_F(FeaturesTest, Proto2Features) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
[pb.cpp] { legacy_closed_enum: true })pb")); [pb.cpp] { legacy_closed_enum: true })pb"));
@ -7333,7 +7333,7 @@ TEST_F(FeaturesTest, Proto2Features) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: DELIMITED message_encoding: DELIMITED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
[pb.cpp] { legacy_closed_enum: true })pb")); [pb.cpp] { legacy_closed_enum: true })pb"));
@ -8401,13 +8401,13 @@ TEST_F(FeaturesTest, MapFieldFeaturesStringValidation) {
message Foo { message Foo {
map<string, string> map_field = 1 [ map<string, string> map_field = 1 [
features.utf8_validation = UNVERIFIED features.utf8_validation = NONE
]; ];
map<int32, string> map_field_value = 2 [ map<int32, string> map_field_value = 2 [
features.utf8_validation = UNVERIFIED features.utf8_validation = NONE
]; ];
map<string, int32> map_field_key = 3 [ map<string, int32> map_field_key = 3 [
features.utf8_validation = UNVERIFIED features.utf8_validation = NONE
]; ];
} }
)schema"; )schema";
@ -9116,7 +9116,7 @@ TEST_F(FeaturesTest, FieldFeatureHelpers) {
number: 7 number: 7
label: LABEL_REPEATED label: LABEL_REPEATED
type: TYPE_STRING type: TYPE_STRING
options { features { utf8_validation: UNVERIFIED } } options { features { utf8_validation: NONE } }
} }
} }
)pb"); )pb");
@ -9546,7 +9546,7 @@ TEST_F(FeaturesTest, InvalidFieldNonStringWithStringValidation) {
number: 1 number: 1
label: LABEL_OPTIONAL label: LABEL_OPTIONAL
type: TYPE_INT64 type: TYPE_INT64
options { features { utf8_validation: UNVERIFIED } } options { features { utf8_validation: NONE } }
} }
} }
)pb", )pb",
@ -9574,7 +9574,7 @@ TEST_F(FeaturesTest, InvalidFieldNonStringMapWithStringValidation) {
uninterpreted_option { uninterpreted_option {
name { name_part: "features" is_extension: false } name { name_part: "features" is_extension: false }
name { name_part: "utf8_validation" is_extension: false } name { name_part: "utf8_validation" is_extension: false }
identifier_value: "UNVERIFIED" identifier_value: "NONE"
} }
} }
} }
@ -9587,7 +9587,7 @@ TEST_F(FeaturesTest, InvalidFieldNonStringMapWithStringValidation) {
uninterpreted_option { uninterpreted_option {
name { name_part: "features" is_extension: false } name { name_part: "features" is_extension: false }
name { name_part: "utf8_validation" is_extension: false } name { name_part: "utf8_validation" is_extension: false }
identifier_value: "UNVERIFIED" identifier_value: "NONE"
} }
} }
} }
@ -9602,7 +9602,7 @@ TEST_F(FeaturesTest, InvalidFieldNonStringMapWithStringValidation) {
uninterpreted_option { uninterpreted_option {
name { name_part: "features" is_extension: false } name { name_part: "features" is_extension: false }
name { name_part: "utf8_validation" is_extension: false } name { name_part: "utf8_validation" is_extension: false }
identifier_value: "UNVERIFIED" identifier_value: "NONE"
} }
} }
} }

@ -20,7 +20,7 @@ import "google/protobuf/editions/proto/editions_transform_proto3.proto";
option features.enum_type = CLOSED; option features.enum_type = CLOSED;
option features.repeated_field_encoding = EXPANDED; option features.repeated_field_encoding = EXPANDED;
option features.utf8_validation = UNVERIFIED; option features.utf8_validation = NONE;
option features.json_format = LEGACY_BEST_EFFORT; option features.json_format = LEGACY_BEST_EFFORT;
option java_multiple_files = true; option java_multiple_files = true;
option cc_enable_arenas = true; option cc_enable_arenas = true;

@ -11,7 +11,7 @@ package protobuf_editions_test;
option features.enum_type = CLOSED; option features.enum_type = CLOSED;
option features.repeated_field_encoding = EXPANDED; option features.repeated_field_encoding = EXPANDED;
option features.utf8_validation = UNVERIFIED; option features.utf8_validation = NONE;
option features.json_format = LEGACY_BEST_EFFORT; option features.json_format = LEGACY_BEST_EFFORT;
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;

@ -11,7 +11,7 @@ package protobuf_editions_test;
option features.enum_type = CLOSED; option features.enum_type = CLOSED;
option features.repeated_field_encoding = EXPANDED; option features.repeated_field_encoding = EXPANDED;
option features.utf8_validation = UNVERIFIED; option features.utf8_validation = NONE;
option features.json_format = LEGACY_BEST_EFFORT; option features.json_format = LEGACY_BEST_EFFORT;
message TestMessageUtf8Disabled { message TestMessageUtf8Disabled {

@ -17,7 +17,7 @@ package protobuf_test_messages.proto2;
option features.enum_type = CLOSED; option features.enum_type = CLOSED;
option features.repeated_field_encoding = EXPANDED; option features.repeated_field_encoding = EXPANDED;
option features.utf8_validation = UNVERIFIED; option features.utf8_validation = NONE;
option features.json_format = LEGACY_BEST_EFFORT; option features.json_format = LEGACY_BEST_EFFORT;
option java_package = "com.google.protobuf_test_messages.proto2"; option java_package = "com.google.protobuf_test_messages.proto2";
option objc_class_prefix = "Proto2"; option objc_class_prefix = "Proto2";

@ -989,7 +989,7 @@ TEST_F(FeatureResolverPoolTest, CompileDefaultsMinimumCovered) {
field_presence: EXPLICIT field_presence: EXPLICIT
enum_type: CLOSED enum_type: CLOSED
repeated_field_encoding: EXPANDED repeated_field_encoding: EXPANDED
utf8_validation: UNVERIFIED utf8_validation: NONE
message_encoding: LENGTH_PREFIXED message_encoding: LENGTH_PREFIXED
json_format: LEGACY_BEST_EFFORT json_format: LEGACY_BEST_EFFORT
[pb.test] { int_file_feature: 0 } [pb.test] { int_file_feature: 0 }

@ -150,7 +150,7 @@ typedef enum {
typedef enum { typedef enum {
google_protobuf_FeatureSet_UTF8_VALIDATION_UNKNOWN = 0, google_protobuf_FeatureSet_UTF8_VALIDATION_UNKNOWN = 0,
google_protobuf_FeatureSet_UNVERIFIED = 1, google_protobuf_FeatureSet_NONE = 1,
google_protobuf_FeatureSet_VERIFY = 2 google_protobuf_FeatureSet_VERIFY = 2
} google_protobuf_FeatureSet_Utf8Validation; } google_protobuf_FeatureSet_Utf8Validation;

Loading…
Cancel
Save