Exemple #1
0
        public void DefaultIndexBuilderULong()
        {
            var number = 12345678901UL;

            var builder = new ULongIndexBuilder <ulong>();

            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, 5, 6, 7, 8, 9, 0 }, level10Index);
        }
Exemple #2
0
        public void DefaultIndexBuilderULong()
        {
            var number = 12345678901UL;

            var builder = new ULongIndexBuilder<ulong>();

            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, 5, 6, 7, 8, 9, 0}, level10Index);
        }