diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-04-17 14:15:52 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-04-17 14:15:52 -0700 |
commit | 01c8c35ca3d3424a9473dd22ea2456933b3e8d36 (patch) | |
tree | de582cb9ef3e449f24015dec09f80e998806b26a /csharp/protos/extest/unittest_issues.proto | |
parent | 813d6d652d8091e9365bfbd01efb5f2ee8bdfbce (diff) | |
parent | 1eab56aee8dddcb656db67d9fb87a8cc6a2ac112 (diff) | |
download | protobuf-01c8c35ca3d3424a9473dd22ea2456933b3e8d36.tar.gz protobuf-01c8c35ca3d3424a9473dd22ea2456933b3e8d36.tar.bz2 protobuf-01c8c35ca3d3424a9473dd22ea2456933b3e8d36.zip |
Merge pull request #2 from jtattermusch/csharp_protobuf_imported
Pulling protobuf-csharp-port into csharp/ directory
Diffstat (limited to 'csharp/protos/extest/unittest_issues.proto')
-rw-r--r-- | csharp/protos/extest/unittest_issues.proto | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/csharp/protos/extest/unittest_issues.proto b/csharp/protos/extest/unittest_issues.proto new file mode 100644 index 00000000..cb803791 --- /dev/null +++ b/csharp/protos/extest/unittest_issues.proto @@ -0,0 +1,137 @@ +// 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.
+import "google/protobuf/csharp_options.proto";
+
+// Issue: Non-"Google.Protobuffers" namespace will ensure that protobuffer library types are qualified
+option (google.protobuf.csharp_file_options).namespace = "UnitTest.Issues.TestProtos";
+option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestExtrasIssuesProtoFile";
+
+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);
+}
+*/
+// Issue 13: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=13
+
+message A {
+ optional int32 _A = 1;
+}
+
+message B {
+ optional int32 B_ = 1;
+}
+
+message AB {
+ optional int32 a_b = 1;
+}
+
+// Similar issue with numeric names
+message NumberField {
+ 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 {
+ FiveBelow = -5;
+ MinusOne = -1;
+ Zero = 0;
+}
+
+message NegativeEnumMessage {
+ optional NegativeEnum value = 1;
+ repeated NegativeEnum values = 2;
+ repeated NegativeEnum packed_values = 3 [packed=true];
+}
+
+// Issue 21: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=21
+// Decorate fields with [deprecated=true] as [System.Obsolete]
+
+message DeprecatedChild {
+}
+
+enum DeprecatedEnum {
+ one = 1;
+}
+
+message DeprecatedFieldsMessage {
+ optional int32 PrimitiveValue = 1 [deprecated = true];
+ repeated int32 PrimitiveArray = 2 [deprecated = true];
+
+ optional DeprecatedChild MessageValue = 3 [deprecated = true];
+ repeated DeprecatedChild MessageArray = 4 [deprecated = true];
+
+ optional 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;
+}
|