public void TestUInt32() { var rnd = new System.Random(); for (var c = 0; c < count; c++) { var mem = new byte[sizeof(UInt32) * writeRepeatCount]; var span1 = new SpanStream(mem); var span2 = new SpanStream(mem); var a = new UInt32[writeRepeatCount]; for (var i = 0; i < writeRepeatCount; i++) { var n = rnd.NextUInt32(); a[i] = n; span1.Write(n); } for (var i = 0; i < writeRepeatCount; i++) { var r = span2.ReadUInt32(); Assert.Equal(a[i], r); } } }