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
10ad653c
Commit
10ad653c
authored
Aug 15, 2008
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflect Java source code.
parent
40c2221e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
UnknownFieldSetTest.cs
csharp/ProtocolBuffers.Test/UnknownFieldSetTest.cs
+15
-0
UnknownFieldSet.cs
csharp/ProtocolBuffers/UnknownFieldSet.cs
+0
-1
No files found.
csharp/ProtocolBuffers.Test/UnknownFieldSetTest.cs
View file @
10ad653c
...
...
@@ -295,5 +295,20 @@ namespace Google.ProtocolBuffers {
}
}
[
Test
]
public
void
LargeVarint
()
{
ByteString
data
=
UnknownFieldSet
.
CreateBuilder
()
.
AddField
(
1
,
UnknownField
.
CreateBuilder
()
.
AddVarint
(
0x7FFFFFFFFFFFFFFFL
)
.
Build
())
.
Build
()
.
ToByteString
();
UnknownFieldSet
parsed
=
UnknownFieldSet
.
ParseFrom
(
data
);
UnknownField
field
=
parsed
[
1
];
Assert
.
AreEqual
(
1
,
field
.
VarintList
.
Count
);
Assert
.
AreEqual
(
0x7FFFFFFFFFFFFFFFU
L
,
field
.
VarintList
[
0
]);
}
}
}
csharp/ProtocolBuffers/UnknownFieldSet.cs
View file @
10ad653c
...
...
@@ -314,7 +314,6 @@ namespace Google.ProtocolBuffers {
int
number
=
WireFormat
.
GetTagFieldNumber
(
tag
);
switch
(
WireFormat
.
GetTagWireType
(
tag
))
{
case
WireFormat
.
WireType
.
Varint
:
// TODO(jonskeet): Check this is correct (different to Java)
GetFieldBuilder
(
number
).
AddVarint
(
input
.
ReadUInt64
());
return
true
;
case
WireFormat
.
WireType
.
Fixed64
:
...
...
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