Searched refs:EncodeZigZag32 (Results 1 – 4 of 4) sorted by relevance
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/ |
D | CodedOutputStreamTest.cs | 212 public void EncodeZigZag32() in EncodeZigZag32() method in Google.Protobuf.CodedOutputStreamTest 214 Assert.AreEqual(0u, CodedOutputStream.EncodeZigZag32(0)); in EncodeZigZag32() 215 Assert.AreEqual(1u, CodedOutputStream.EncodeZigZag32(-1)); in EncodeZigZag32() 216 Assert.AreEqual(2u, CodedOutputStream.EncodeZigZag32(1)); in EncodeZigZag32() 217 Assert.AreEqual(3u, CodedOutputStream.EncodeZigZag32(-2)); in EncodeZigZag32() 218 Assert.AreEqual(0x7FFFFFFEu, CodedOutputStream.EncodeZigZag32(0x3FFFFFFF)); in EncodeZigZag32() 219 … Assert.AreEqual(0x7FFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0xC0000000))); in EncodeZigZag32() 220 Assert.AreEqual(0xFFFFFFFEu, CodedOutputStream.EncodeZigZag32(0x7FFFFFFF)); in EncodeZigZag32() 221 … Assert.AreEqual(0xFFFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0x80000000))); in EncodeZigZag32() 250 … Assert.AreEqual(0, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(0))); in RoundTripZigZag32() [all …]
|
/external/protobuf/csharp/src/Google.Protobuf.Test/ |
D | CodedOutputStreamTest.cs | 212 public void EncodeZigZag32() in EncodeZigZag32() method in Google.Protobuf.CodedOutputStreamTest 214 Assert.AreEqual(0u, CodedOutputStream.EncodeZigZag32(0)); in EncodeZigZag32() 215 Assert.AreEqual(1u, CodedOutputStream.EncodeZigZag32(-1)); in EncodeZigZag32() 216 Assert.AreEqual(2u, CodedOutputStream.EncodeZigZag32(1)); in EncodeZigZag32() 217 Assert.AreEqual(3u, CodedOutputStream.EncodeZigZag32(-2)); in EncodeZigZag32() 218 Assert.AreEqual(0x7FFFFFFEu, CodedOutputStream.EncodeZigZag32(0x3FFFFFFF)); in EncodeZigZag32() 219 … Assert.AreEqual(0x7FFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0xC0000000))); in EncodeZigZag32() 220 Assert.AreEqual(0xFFFFFFFEu, CodedOutputStream.EncodeZigZag32(0x7FFFFFFF)); in EncodeZigZag32() 221 … Assert.AreEqual(0xFFFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0x80000000))); in EncodeZigZag32() 250 … Assert.AreEqual(0, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(0))); in RoundTripZigZag32() [all …]
|
/external/protobuf/csharp/src/Google.Protobuf/ |
D | CodedOutputStream.ComputeSize.cs | 211 return ComputeRawVarint32Size(EncodeZigZag32(value)); in ComputeSInt32Size()
|
D | CodedOutputStream.cs | 368 WriteRawVarint32(EncodeZigZag32(value)); in WriteSInt32() 654 internal static uint EncodeZigZag32(int n) in EncodeZigZag32() method in Google.Protobuf.CodedOutputStream
|