//[Fact(Skip = "Skipped")] public void VariantBitConverterULongTest() { Util.Log("VariantBitConverterULongTest"); Random random = new Random(); MemoryStream stream = new MemoryStream(); long size = 0; for (int i = 0; i < 1000; i++) { stream.Position = 0; ulong src = (ulong)(random.NextDouble() * Int64.MaxValue); int s = 0; VarintBitConverter.SerializeULong(src, stream, out s); size = stream.Position; stream.Position = 0; ulong dst = VarintBitConverter.ToULong(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); } } }