EncodeZigZag64() private method

private EncodeZigZag64 ( long n ) : ulong
n long
return ulong
        public void RoundTripZigZag64()
        {
            Assert.AreEqual(0, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(0)));
            Assert.AreEqual(1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(1)));
            Assert.AreEqual(-1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-1)));
            Assert.AreEqual(14927, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(14927)));
            Assert.AreEqual(-3612, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-3612)));

            Assert.AreEqual(856912304801416L, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(856912304801416L)));
            Assert.AreEqual(-75123905439571256L, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-75123905439571256L)));
        }
 public void EncodeZigZag64()
 {
     Assert.AreEqual(0, CodedOutputStream.EncodeZigZag64(0));
     Assert.AreEqual(1, CodedOutputStream.EncodeZigZag64(-1));
     Assert.AreEqual(2, CodedOutputStream.EncodeZigZag64(1));
     Assert.AreEqual(3, CodedOutputStream.EncodeZigZag64(-2));
     Assert.AreEqual(0x000000007FFFFFFEL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0x000000003FFFFFFFUL)));
     Assert.AreEqual(0x000000007FFFFFFFL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0xFFFFFFFFC0000000UL)));
     Assert.AreEqual(0x00000000FFFFFFFEL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0x000000007FFFFFFFUL)));
     Assert.AreEqual(0x00000000FFFFFFFFL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0xFFFFFFFF80000000UL)));
     Assert.AreEqual(0xFFFFFFFFFFFFFFFEL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0x7FFFFFFFFFFFFFFFUL)));
     Assert.AreEqual(0xFFFFFFFFFFFFFFFFL,
                     CodedOutputStream.EncodeZigZag64(unchecked ((long)0x8000000000000000UL)));
 }