public void WriteRead_First1000()
        {
            for (ulong input = 0; input < 1000; input++)
            {
                var encoded = FibonacciUnsignedWriter.WriteOneDefault(input);
                var output  = FibonacciUnsignedReader.ReadOneDefault(encoded);

                Assert.AreEqual(input, output);
            }
        }
        public void WriteRead_100000000000000()
        {
            var encoded = FibonacciUnsignedWriter.WriteOneDefault(100000000000000);

            Assert.AreEqual((ulong)100000000000000, FibonacciUnsignedReader.ReadOneDefault(encoded));
        }
Пример #3
0
 private ulong Read(string input)
 {
     return(FibonacciUnsignedReader.ReadOneDefault(BitOperation.ParseToBytes(input)));
 }