Skip to content

Commit

Permalink
Update proto files from upstream.
Browse files Browse the repository at this point in the history
Used upstream 138451296bf4101f992faa215a1899f3b9ec29e7.
  • Loading branch information
thomasvl committed Aug 23, 2024
1 parent 0e46730 commit aeaac78
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 7 deletions.
14 changes: 13 additions & 1 deletion Protos/Conformance/conformance/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,23 @@ enum TestCategory {
TEXT_FORMAT_TEST = 5;
}

// Meant to encapsulate all types of tests: successes, skips, failures, etc.
// Therefore, this may or may not have a failure message. Failure messages
// may be truncated for our failure lists.
message TestStatus {
string name = 1;
string failure_message = 2;
// What an actual test name matched to in a failure list. Can be wildcarded or
// an exact match without wildcards.
string matched_name = 3;
}

// The conformance runner will request a list of failures as the first request.
// This will be known by message_type == "conformance.FailureSet", a conformance
// test should return a serialized FailureSet in protobuf_payload.
message FailureSet {
repeated string failure = 1;
repeated TestStatus test = 2;
reserved 1;
}

// Represents a single test case's input. The testee should:
Expand Down
14 changes: 13 additions & 1 deletion Protos/upstream/conformance/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,23 @@ enum TestCategory {
TEXT_FORMAT_TEST = 5;
}

// Meant to encapsulate all types of tests: successes, skips, failures, etc.
// Therefore, this may or may not have a failure message. Failure messages
// may be truncated for our failure lists.
message TestStatus {
string name = 1;
string failure_message = 2;
// What an actual test name matched to in a failure list. Can be wildcarded or
// an exact match without wildcards.
string matched_name = 3;
}

// The conformance runner will request a list of failures as the first request.
// This will be known by message_type == "conformance.FailureSet", a conformance
// test should return a serialized FailureSet in protobuf_payload.
message FailureSet {
repeated string failure = 1;
repeated TestStatus test = 2;
reserved 1;
}

// Represents a single test case's input. The testee should:
Expand Down
17 changes: 14 additions & 3 deletions Protos/upstream/google/protobuf/cpp_features.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ message CppFeatures {
feature_support = {
edition_introduced: EDITION_2023,
edition_deprecated: EDITION_2023,
deprecation_warning: "The legacy closed enum treatment in C++ is "
deprecation_warning: "The legacy closed enum behavior in C++ is "
"deprecated and is scheduled to be removed in "
"edition 2025. Mark enum type on the enum "
"definitions themselves rather than on fields.",
"edition 2025. See http://protobuf.dev/programming-guides/enum/#cpp for "
"more information",
},
edition_defaults = { edition: EDITION_LEGACY, value: "true" },
edition_defaults = { edition: EDITION_PROTO3, value: "false" }
Expand All @@ -53,4 +53,15 @@ message CppFeatures {
edition_defaults = { edition: EDITION_LEGACY, value: "STRING" },
edition_defaults = { edition: EDITION_2024, value: "VIEW" }
];

optional bool enum_name_uses_string_view = 3 [
retention = RETENTION_SOURCE,
targets = TARGET_TYPE_ENUM,
targets = TARGET_TYPE_FILE,
feature_support = {
edition_introduced: EDITION_2024,
},
edition_defaults = { edition: EDITION_LEGACY, value: "false" },
edition_defaults = { edition: EDITION_2024, value: "true" }
];
}
2 changes: 1 addition & 1 deletion Protos/upstream/google/protobuf/unittest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ message TestAllTypes {
repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
repeated string repeated_cord = 55 [ctype=CORD];

repeated NestedMessage repeated_lazy_message = 57 ;
repeated NestedMessage repeated_lazy_message = 57 [lazy=true];

// Singular with defaults
optional int32 default_int32 = 61 [default = 41 ];
Expand Down
4 changes: 4 additions & 0 deletions Protos/upstream/google/protobuf/unittest_lite.proto
Original file line number Diff line number Diff line change
Expand Up @@ -625,3 +625,7 @@ message RecursiveMessage {
RecursiveMessage recurse = 1;
bytes payload = 2;
}

message RecursiveGroup {
RecursiveGroup recurse = 1 [features.message_encoding = DELIMITED];
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ message TestAllTypes {
repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
repeated string repeated_cord = 55 [ctype = CORD];

repeated NestedMessage repeated_lazy_message = 57 ;
repeated NestedMessage repeated_lazy_message = 57;

oneof oneof_field {
uint32 oneof_uint32 = 111;
Expand All @@ -112,6 +112,12 @@ message ForeignMessage {
int32 c = 1;
}

// Same as ForeignMessage, but all fields have explicit presence.
// It can be useful for testing explicit-implicit presence interop behaviour.
message ExplicitForeignMessage {
int32 c = 1 [features.field_presence = EXPLICIT];
}

enum ForeignEnum {
FOREIGN_FOO = 0;
FOREIGN_BAR = 1;
Expand Down

0 comments on commit aeaac78

Please sign in to comment.