-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
11,479 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
# proto2 extensions are not implemented | ||
# WARNING, test=Recommended.Proto2.JsonInput.FieldNameExtension.Validator: Expected JSON payload but got type 1. request=json_payload: "{\n \"[protobuf_test_messages.proto2.extension_int32]\": 1\n }" requested_output_format: JSON message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: JSON_TEST, response=parse_error: "Error: cannot decode message protobuf_test_messages.proto2.TestAllTypesProto2 from JSON: key \"[protobuf_test_messages.proto2.extension_int32]\" is unknown" | ||
Recommended.Proto2.JsonInput.FieldNameExtension.Validator | ||
4 changes: 0 additions & 4 deletions
4
packages/protobuf-conformance/failing_tests_without_bigint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
packages/protobuf-conformance/src/gen/google/protobuf/test_messages_proto2_pb.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Copyright 2021-2024 Buf Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto2"; | ||
package proto2ext; | ||
|
||
import "extra/example.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
// The message we're going to extend | ||
message Proto2Extendee { | ||
optional int32 own_field = 1; | ||
extensions 1000 to 9999; | ||
} | ||
|
||
// An enumeration used in extensions | ||
enum Proto2ExtEnum { | ||
PROTO2_EXT_ENUM_YES = 1; | ||
PROTO2_EXT_ENUM_NO = 2; | ||
} | ||
|
||
// A message used in extensions | ||
message Proto2ExtMessage { | ||
optional string string_field = 1; | ||
} | ||
|
||
// Testing all kinds of extensions. | ||
// Required fields, maps, oneof are not allowed in extensions. | ||
extend Proto2Extendee { | ||
|
||
optional uint32 uint32_ext = 1001; | ||
optional uint32 uint32_ext_with_default = 1002 [default = 999]; | ||
|
||
optional string string_ext = 2001; | ||
optional string string_ext_with_default = 2002 [default = "hello \" */ "]; | ||
|
||
optional uint64 uint64_ext = 3001; | ||
optional uint64 uint64_ext_js_string = 3002 [jstype = JS_STRING]; | ||
|
||
optional bytes bytes_ext = 4001; | ||
optional bytes bytes_ext_with_default = 4002 [default = "\0x\\x\"x\'A\101\x41\x41\u0041\U00000041\b\f\n\r\t\v"]; | ||
|
||
optional Proto2ExtEnum enum_ext = 5001; | ||
optional Proto2ExtEnum enum_ext_with_default = 5002 [default = PROTO2_EXT_ENUM_NO]; | ||
|
||
optional Proto2ExtMessage message_ext = 6001; | ||
optional docs.User message_ext_proto3 = 6002; | ||
|
||
repeated Proto2ExtMessage repeated_message_ext = 7001; | ||
repeated Proto2ExtEnum repeated_enum_ext = 7005; | ||
repeated string repeated_string_ext = 7002; | ||
repeated uint32 packed_uint32_ext = 7003 [packed = true]; | ||
repeated uint32 unpacked_uint32_ext = 7004; // unpacked by default in proto2 | ||
|
||
optional google.protobuf.UInt32Value wrapper_ext = 8001; | ||
|
||
optional group GroupExt = 8100 { | ||
optional int32 a = 1; | ||
optional int32 b = 2; | ||
} | ||
repeated group RepeatedGroupExt = 8101 { | ||
optional int32 a = 1; | ||
optional int32 b = 2; | ||
} | ||
} | ||
|
||
// A container for nested extensions | ||
message Proto2ExtContainer { | ||
extend Proto2Extendee { | ||
optional uint32 uint32_ext = 9001; | ||
} | ||
message Child { | ||
extend Proto2Extendee { | ||
optional uint32 uint32_ext = 9010; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2021-2024 Buf Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
package proto3ext; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
import "extra/example.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
// In proto3, we can only extend options. | ||
extend google.protobuf.FileOptions { | ||
uint32 uint32_ext = 1001; | ||
optional uint32 optional_uint32_ext = 1002; | ||
repeated uint32 packed_uint32_ext = 7003; | ||
repeated uint32 unpacked_uint32_ext = 7004 [packed = false]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.