public void TestSignZigZagInt32_m2147483648() { // encoding doc gives numbers in terms of uint equivalent ZigZagInt32 zz = new ZigZagInt32 { Foo = -2147483648 }, clone = Serializer.DeepClone(zz); Assert.AreEqual(zz.Foo, clone.Foo, "Roundtrip"); TwosComplementUInt32 tc = Serializer.ChangeType <ZigZagInt32, TwosComplementUInt32>(zz); Assert.AreEqual(4294967295, tc.Foo); }
public void TestSignZigZagInt32_m2147483648() { // encoding doc gives numbers in terms of uint equivalent ZigZagInt32 zz = new ZigZagInt32 { Foo = -2147483648 }, clone = Serializer.DeepClone(zz); Assert.AreEqual(zz.Foo, clone.Foo, "Roundtrip"); TwosComplementUInt32 tc = Serializer.ChangeType<ZigZagInt32, TwosComplementUInt32>(zz); Assert.AreEqual(4294967295, tc.Foo); }