예제 #1
0
        public void biggerCompressedArray1()
        {
            // Compressed array is bigger than original, because of VariableByte.
            IntegerCODEC c = new VariableByte();

            TestUtils.assertSymmetry(c, -1);
        }
예제 #2
0
        public void RandomVariableByteTest()
        {
            for (var i = 0; i < _randomVariableTestIterations; i++)
            {
                const byte min = byte.MinValue;
                const byte max = byte.MaxValue;

                var a = (byte)RandomHelper.NextInt(min, max);
                var b = (byte)RandomHelper.NextInt(min, max);

                var v = new VariableByte(a, b);

                WriteTest(v, (x, y, z) => x.Write(y, (VariableByte)z), (x, y) => x.ReadVariableByte(y));
            }
        }