Example #1
0
        public void AddIntegerAsSmallIntMax()
        {
            VPackBuilder builder = new VPackBuilder();
            int          value   = 9;

            builder.AddCompactInt(value);

            VPackSlice slice = builder.Slice();

            Assert.True(slice.IsType(SliceType.SmallInt));

            Assert.Equal(slice.ToInt32(), value);
        }
Example #2
0
        public void AddLongAsSmallIntMin()
        {
            VPackBuilder builder = new VPackBuilder();
            long         value   = -6;

            builder.AddCompactInt(value);

            VPackSlice slice = builder.Slice();

            Assert.True(slice.IsType(SliceType.SmallInt));

            Assert.Equal(slice.ToInt64(), value);
        }