public void PrimitiveConstArraysWithBackfill() { PrimitiveConstArraysStruct value = new PrimitiveConstArraysStruct() { A = new byte[] { 1 }, B = new sbyte[] { -2 }, C = new ushort[] { }, D = new short[] { }, E = new uint[] { 2 }, F = new int[] { -3 }, G = null, H = null, }; PrimitiveConstArraysStruct expectedDeserializeValue = new PrimitiveConstArraysStruct() { A = new byte[] { 1, 0 }, B = new sbyte[] { -2, 0 }, C = new ushort[] { 0, 0 }, D = new short[] { 0, 0 }, E = new uint[] { 2, 0 }, F = new int[] { -3, 0 }, G = new ulong[] { 0, 0 }, H = new long[] { 0, 0 }, }; CheckSerializers( value, expectedDeserializeValue, PrimitiveConstArraysStruct.Size, PrimitiveConstArraysStructSerializer.Size, PrimitiveConstArraysStructSerializer.CalculateSize, PrimitiveConstArraysStructSerializer.Serialize, PrimitiveConstArraysStructSerializer.Deserialize); }
public void PrimitiveConstArrays() { PrimitiveConstArraysStruct value = new PrimitiveConstArraysStruct() { A = new byte[] { 1, 2 }, B = new sbyte[] { -3, -4 }, C = new ushort[] { 5, 6 }, D = new short[] { -7, -8 }, E = new uint[] { 9, 10 }, F = new int[] { -11, -12 }, G = new ulong[] { 13, 14 }, H = new long[] { -15, -16 }, }; CheckSerializers( value, PrimitiveConstArraysStruct.Size, PrimitiveConstArraysStructSerializer.Size, PrimitiveConstArraysStructSerializer.CalculateSize, PrimitiveConstArraysStructSerializer.Serialize, PrimitiveConstArraysStructSerializer.Deserialize); }