aboutsummaryrefslogtreecommitdiff
path: root/csharp/protos
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-06-09 19:30:44 +0100
committerJon Skeet <skeet@pobox.com>2015-06-09 19:30:44 +0100
commite38294a62d7f37c0661273a9a26fda16d557423f (patch)
tree316989251907553408e7b32a12792f496333e075 /csharp/protos
parentf52426827e4d5e8da7d205af538799740b5199b9 (diff)
downloadprotobuf-e38294a62d7f37c0661273a9a26fda16d557423f.tar.gz
protobuf-e38294a62d7f37c0661273a9a26fda16d557423f.tar.bz2
protobuf-e38294a62d7f37c0661273a9a26fda16d557423f.zip
First pass at the mutable API. Quite a bit more to do - in particular, it's pretty slow right now.
Diffstat (limited to 'csharp/protos')
-rw-r--r--csharp/protos/extest/unittest_issues.proto86
1 files changed, 9 insertions, 77 deletions
diff --git a/csharp/protos/extest/unittest_issues.proto b/csharp/protos/extest/unittest_issues.proto
index 97249dff..c123acf1 100644
--- a/csharp/protos/extest/unittest_issues.proto
+++ b/csharp/protos/extest/unittest_issues.proto
@@ -1,4 +1,4 @@
-syntax = "proto2";
+syntax = "proto3";
// These proto descriptors have at one time been reported as an issue or defect.
// They are kept here to replicate the issue, and continue to verify the fix.
@@ -9,65 +9,6 @@ option csharp_namespace = "UnitTest.Issues.TestProtos";
package unittest_issues;
option optimize_for = SPEED;
-// The following is a representative set of features
-/*
-enum EnumOptions {
- ONE = 0;
- TWO = 1;
- THREE = 2;
-}
-
-message TestBasicChild
-{
- repeated EnumOptions options = 3;
- optional bytes binary = 4;
-}
-
-message TestBasicNoFields {
-}
-
-message TestBasicRescursive {
- optional TestBasicRescursive child = 1;
-}
-
-message TestBasicMessage {
-
- optional int64 number = 6;
- repeated int32 numbers = 2;
- optional string text = 3;
- repeated string textlines = 700;
- optional bool valid = 5;
-
- optional TestBasicChild child = 1;
- repeated group Children = 401
- {
- repeated EnumOptions options = 3;
- optional bytes binary = 4;
- }
-
- extensions 100 to 199;
-}
-
-message TestBasicExtension {
- required int32 number = 1;
-}
-
-extend TestBasicMessage {
- optional EnumOptions extension_enum = 101;
- optional string extension_text = 102;
- repeated int32 extension_number = 103 [packed = true];
- optional TestBasicExtension extension_message = 199;
-}
-
-// Issue for non-qualified type reference in new services generation
-option (google.protobuf.csharp_file_options).service_generator_type = IRPCDISPATCH;
-
-service TestGenericService {
- rpc Foo(TestBasicNoFields) returns (TestBasicMessage);
- rpc Bar(TestBasicNoFields) returns (TestBasicMessage);
-}
-*/
-
// Old issue 13: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=13
// New issue 309: https://github.com/google/protobuf/issues/309
@@ -90,27 +31,17 @@ service TestGenericService {
// optional int32 _01 = 1;
// }
-// Issue 28: Circular message dependencies result in null defaults for DefaultInstance
-
-message MyMessageAReferenceB {
- required MyMessageBReferenceA value = 1;
-}
-
-message MyMessageBReferenceA {
- required MyMessageAReferenceB value = 1;
-}
-
// issue 19 - negative enum values
enum NegativeEnum {
+ NEGATIVE_ENUM_ZERO = 0;
FiveBelow = -5;
MinusOne = -1;
- Zero = 0;
}
message NegativeEnumMessage {
- optional NegativeEnum value = 1;
- repeated NegativeEnum values = 2;
+ NegativeEnum value = 1;
+ repeated NegativeEnum values = 2 [packed = false];
repeated NegativeEnum packed_values = 3 [packed=true];
}
@@ -121,21 +52,22 @@ message DeprecatedChild {
}
enum DeprecatedEnum {
+ DEPRECATED_ZERO = 0;
one = 1;
}
message DeprecatedFieldsMessage {
- optional int32 PrimitiveValue = 1 [deprecated = true];
+ int32 PrimitiveValue = 1 [deprecated = true];
repeated int32 PrimitiveArray = 2 [deprecated = true];
- optional DeprecatedChild MessageValue = 3 [deprecated = true];
+ DeprecatedChild MessageValue = 3 [deprecated = true];
repeated DeprecatedChild MessageArray = 4 [deprecated = true];
- optional DeprecatedEnum EnumValue = 5 [deprecated = true];
+ DeprecatedEnum EnumValue = 5 [deprecated = true];
repeated DeprecatedEnum EnumArray = 6 [deprecated = true];
}
// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
message ItemField {
- optional int32 item = 1;
+ int32 item = 1;
}