Home
last modified time | relevance | path

Searched refs:EncodeZigZag32 (Results 1 – 4 of 4) sorted by relevance

/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs212 public void EncodeZigZag32() in EncodeZigZag32() method in Google.Protobuf.CodedOutputStreamTest
214 Assert.AreEqual(0u, WritingPrimitives.EncodeZigZag32(0)); in EncodeZigZag32()
215 Assert.AreEqual(1u, WritingPrimitives.EncodeZigZag32(-1)); in EncodeZigZag32()
216 Assert.AreEqual(2u, WritingPrimitives.EncodeZigZag32(1)); in EncodeZigZag32()
217 Assert.AreEqual(3u, WritingPrimitives.EncodeZigZag32(-2)); in EncodeZigZag32()
218 Assert.AreEqual(0x7FFFFFFEu, WritingPrimitives.EncodeZigZag32(0x3FFFFFFF)); in EncodeZigZag32()
219 … Assert.AreEqual(0x7FFFFFFFu, WritingPrimitives.EncodeZigZag32(unchecked((int) 0xC0000000))); in EncodeZigZag32()
220 Assert.AreEqual(0xFFFFFFFEu, WritingPrimitives.EncodeZigZag32(0x7FFFFFFF)); in EncodeZigZag32()
221 … Assert.AreEqual(0xFFFFFFFFu, WritingPrimitives.EncodeZigZag32(unchecked((int) 0x80000000))); in EncodeZigZag32()
250 … Assert.AreEqual(0, ParsingPrimitives.DecodeZigZag32(WritingPrimitives.EncodeZigZag32(0))); in RoundTripZigZag32()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs306 public void EncodeZigZag32() in EncodeZigZag32() method in Google.Protobuf.CodedOutputStreamTest
308 Assert.AreEqual(0u, WritingPrimitives.EncodeZigZag32(0)); in EncodeZigZag32()
309 Assert.AreEqual(1u, WritingPrimitives.EncodeZigZag32(-1)); in EncodeZigZag32()
310 Assert.AreEqual(2u, WritingPrimitives.EncodeZigZag32(1)); in EncodeZigZag32()
311 Assert.AreEqual(3u, WritingPrimitives.EncodeZigZag32(-2)); in EncodeZigZag32()
312 Assert.AreEqual(0x7FFFFFFEu, WritingPrimitives.EncodeZigZag32(0x3FFFFFFF)); in EncodeZigZag32()
313 … Assert.AreEqual(0x7FFFFFFFu, WritingPrimitives.EncodeZigZag32(unchecked((int) 0xC0000000))); in EncodeZigZag32()
314 Assert.AreEqual(0xFFFFFFFEu, WritingPrimitives.EncodeZigZag32(0x7FFFFFFF)); in EncodeZigZag32()
315 … Assert.AreEqual(0xFFFFFFFFu, WritingPrimitives.EncodeZigZag32(unchecked((int) 0x80000000))); in EncodeZigZag32()
344 … Assert.AreEqual(0, ParsingPrimitives.DecodeZigZag32(WritingPrimitives.EncodeZigZag32(0))); in RoundTripZigZag32()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf/
DCodedOutputStream.ComputeSize.cs211 return ComputeRawVarint32Size(WritingPrimitives.EncodeZigZag32(value)); in ComputeSInt32Size()
DWritingPrimitives.cs259 WriteRawVarint32(ref buffer, ref state, EncodeZigZag32(value)); in WriteSInt32()
608 public static uint EncodeZigZag32(int n) in EncodeZigZag32() method in Google.Protobuf.WritingPrimitives