//[Fact(Skip = "Skipped")] public void VariantBitConverterIntTest() { Util.Log("VariantBitConverterIntTest"); Random random = new Random(); MemoryStream stream = new MemoryStream(); long size = 0; for (int i = 0; i < 1000; i++) { stream.Position = 0; int src = (int)random.Next(int.MinValue, int.MaxValue); int s = 0; VarintBitConverter.SerializeInt(src, stream, out s); size = stream.Position; stream.Position = 0; int dst = VarintBitConverter.ToInt(stream, out s); //Util.Log("src:" + src + ", dst:" + dst + ", size:" + size); if (src != dst) { throw new InvalidProgramException("index:" + i + ", src:" + src + ", dst:" + dst + ", size:" + size); } } }