Exemplo n.º 1
0
        public void IndexBuilderUInt32()
        {
            var number = 1234U;

            var builder = new UIntIndexBuilder <uint>();

            var level0Index = builder.Build(number, 0);

            Assert.Equal(new int[] { }, level0Index);

            var level1Index = builder.Build(number, 1);

            Assert.Equal(new[] { 1 }, level1Index);

            var level3Index = builder.Build(number, 3);

            Assert.Equal(new[] { 1, 2, 3 }, level3Index);

            var level10Index = builder.Build(number, 10);

            Assert.Equal(new[] { 1, 2, 3, 4 }, level10Index);
        }
Exemplo n.º 2
0
        public void IndexBuilderUInt32()
        {
            var number = 1234U;

            var builder = new UIntIndexBuilder<uint>();

            var level0Index = builder.Build(number, 0);
            Assert.Equal(new int[] { }, level0Index);

            var level1Index = builder.Build(number, 1);
            Assert.Equal(new[] { 1 }, level1Index);

            var level3Index = builder.Build(number, 3);
            Assert.Equal(new[] { 1, 2, 3 }, level3Index);

            var level10Index = builder.Build(number, 10);
            Assert.Equal(new[] { 1, 2, 3, 4 }, level10Index);
        }