Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
0f370b46
Commit
0f370b46
authored
Aug 03, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a redundant layer of directory hierarchy.
parent
bf1cc921
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
121 deletions
+122
-121
Makefile.am
Makefile.am
+1
-1
generate_protos.sh
csharp/generate_protos.sh
+2
-2
unittest_issues.proto
csharp/protos/unittest_issues.proto
+119
-118
No files found.
Makefile.am
View file @
0f370b46
...
...
@@ -48,7 +48,7 @@ csharp_EXTRA_DIST= \
csharp/generate_protos.sh
\
csharp/keys/Google.Protobuf.public.snk
\
csharp/keys/README.md
\
csharp/protos/
extest/unittest_issues.proto
\
csharp/protos/
unittest_issues.proto
\
csharp/src/AddressBook/AddPerson.cs
\
csharp/src/AddressBook/AddressBook.csproj
\
csharp/src/AddressBook/Addressbook.cs
\
...
...
csharp/generate_protos.sh
View file @
0f370b46
...
...
@@ -62,8 +62,8 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \
src/google/protobuf/unittest_well_known_types.proto
$PROTOC
-Icsharp
/protos
/extest
--csharp_out
=
csharp/src/Google.Protobuf.Test/TestProtos
\
csharp/protos/
extest/
unittest_issues.proto
$PROTOC
-Icsharp
/protos
--csharp_out
=
csharp/src/Google.Protobuf.Test/TestProtos
\
csharp/protos/unittest_issues.proto
# AddressBook sample protos
$PROTOC
-Iexamples
--csharp_out
=
csharp/src/AddressBook
\
...
...
csharp/protos/
extest/
unittest_issues.proto
→
csharp/protos/unittest_issues.proto
View file @
0f370b46
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.
// Issue: Non-"Google.Protobuffers" namespace will ensure that protobuffer library types are qualified
option
csharp_namespace
=
"UnitTest.Issues.TestProtos"
;
package
unittest_issues
;
option
optimize_for
=
SPEED
;
// Issue 307: when generating doubly-nested types, any references
// should be of the form A.Types.B.Types.C.
message
Issue307
{
message
NestedOnce
{
message
NestedTwice
{
}
}
}
// 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
// message A {
// optional int32 _A = 1;
// }
// message B {
// optional int32 B_ = 1;
// }
//message AB {
// optional int32 a_b = 1;
//}
// Similar issue with numeric names
// Java code failed too, so probably best for this to be a restriction.
// See https://github.com/google/protobuf/issues/308
// message NumberField {
// optional int32 _01 = 1;
// }
// issue 19 - negative enum values
enum
NegativeEnum
{
NEGATIVE_ENUM_ZERO
=
0
;
FiveBelow
=
-
5
;
MinusOne
=
-
1
;
}
message
NegativeEnumMessage
{
NegativeEnum
value
=
1
;
repeated
NegativeEnum
values
=
2
[
packed
=
false
];
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
{
DEPRECATED_ZERO
=
0
;
one
=
1
;
}
message
DeprecatedFieldsMessage
{
int32
PrimitiveValue
=
1
[
deprecated
=
true
];
repeated
int32
PrimitiveArray
=
2
[
deprecated
=
true
];
DeprecatedChild
MessageValue
=
3
[
deprecated
=
true
];
repeated
DeprecatedChild
MessageArray
=
4
[
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
{
int32
item
=
1
;
}
message
ReservedNames
{
// Force a nested type called Types
message
SomeNestedType
{
}
int32
types
=
1
;
int32
descriptor
=
2
;
}
message
TestJsonFieldOrdering
{
// These fields are deliberately not declared in numeric
// order, and the oneof fields aren't contiguous either.
// This allows for reasonably robust tests of JSON output
// ordering.
// TestFieldOrderings in unittest_proto3.proto is similar,
// but doesn't include oneofs.
// TODO: Consider adding oneofs to TestFieldOrderings, although
// that will require fixing other tests in multiple platforms.
// Alternatively, consider just adding this to
// unittest_proto3.proto if multiple platforms want it.
int32
plain_int32
=
4
;
oneof
o1
{
string
o1_string
=
2
;
int32
o1_int32
=
5
;
}
string
plain_string
=
1
;
oneof
o2
{
int32
o2_int32
=
6
;
string
o2_string
=
3
;
}
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.
// Issue: Non-"Google.Protobuffers" namespace will ensure that protobuffer library types are qualified
option
csharp_namespace
=
"UnitTest.Issues.TestProtos"
;
package
unittest_issues
;
option
optimize_for
=
SPEED
;
// Issue 307: when generating doubly-nested types, any references
// should be of the form A.Types.B.Types.C.
message
Issue307
{
message
NestedOnce
{
message
NestedTwice
{
}
}
}
// 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
// message A {
// optional int32 _A = 1;
// }
// message B {
// optional int32 B_ = 1;
// }
//message AB {
// optional int32 a_b = 1;
//}
// Similar issue with numeric names
// Java code failed too, so probably best for this to be a restriction.
// See https://github.com/google/protobuf/issues/308
// message NumberField {
// optional int32 _01 = 1;
// }
// issue 19 - negative enum values
enum
NegativeEnum
{
NEGATIVE_ENUM_ZERO
=
0
;
FiveBelow
=
-
5
;
MinusOne
=
-
1
;
}
message
NegativeEnumMessage
{
NegativeEnum
value
=
1
;
repeated
NegativeEnum
values
=
2
[
packed
=
false
];
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
{
DEPRECATED_ZERO
=
0
;
one
=
1
;
}
message
DeprecatedFieldsMessage
{
int32
PrimitiveValue
=
1
[
deprecated
=
true
];
repeated
int32
PrimitiveArray
=
2
[
deprecated
=
true
];
DeprecatedChild
MessageValue
=
3
[
deprecated
=
true
];
repeated
DeprecatedChild
MessageArray
=
4
[
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
{
int32
item
=
1
;
}
message
ReservedNames
{
// Force a nested type called Types
message
SomeNestedType
{
}
int32
types
=
1
;
int32
descriptor
=
2
;
}
message
TestJsonFieldOrdering
{
// These fields are deliberately not declared in numeric
// order, and the oneof fields aren't contiguous either.
// This allows for reasonably robust tests of JSON output
// ordering.
// TestFieldOrderings in unittest_proto3.proto is similar,
// but doesn't include oneofs.
// TODO: Consider adding oneofs to TestFieldOrderings, although
// that will require fixing other tests in multiple platforms.
// Alternatively, consider just adding this to
// unittest_proto3.proto if multiple platforms want it.
int32
plain_int32
=
4
;
oneof
o1
{
string
o1_string
=
2
;
int32
o1_int32
=
5
;
}
string
plain_string
=
1
;
oneof
o2
{
int32
o2_int32
=
6
;
string
o2_string
=
3
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment