aboutsummaryrefslogtreecommitdiff
path: root/protos/extest/unittest_issues.proto
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-08-12 17:33:02 -0500
committerrogerk <devnull@localhost>2011-08-12 17:33:02 -0500
commit50a89c1c859760a4c81a476ec490a09ae7b92060 (patch)
treef5ff8f2d4260308fbc5d9a1cbcefd13491cb8ec5 /protos/extest/unittest_issues.proto
parentc7b23c17979e93fb91be6e9a35ec0aef4a73704d (diff)
downloadprotobuf-50a89c1c859760a4c81a476ec490a09ae7b92060.tar.gz
protobuf-50a89c1c859760a4c81a476ec490a09ae7b92060.tar.bz2
protobuf-50a89c1c859760a4c81a476ec490a09ae7b92060.zip
Fixed removal of all '_' from names, Added unit test.
Diffstat (limited to 'protos/extest/unittest_issues.proto')
-rw-r--r--protos/extest/unittest_issues.proto82
1 files changed, 82 insertions, 0 deletions
diff --git a/protos/extest/unittest_issues.proto b/protos/extest/unittest_issues.proto
new file mode 100644
index 00000000..2e82a6ef
--- /dev/null
+++ b/protos/extest/unittest_issues.proto
@@ -0,0 +1,82 @@
+// 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;
+}