Exemple #1
0
        public void Distinct1()
        {
            var set = new CharSeq("".ToCharArray());

            Assert.Equal("", set.ToString());

            set = new CharSeq("1".ToCharArray());
            Assert.Equal("1", set.ToString());

            set = new CharSeq("11".ToCharArray());
            Assert.Equal("1", set.ToString());

            set = new CharSeq("142321423456789".ToCharArray());
            Assert.Equal("123456789", set.ToString());

            set = new CharSeq("0000000000000000000000000".ToCharArray());
            Assert.Equal("0", set.ToString());

            set = new CharSeq("0111111111111111111111111112".ToCharArray());
            Assert.Equal("012", set.ToString());

            set = new CharSeq("111111111111111112".ToCharArray());
            Assert.Equal("12", set.ToString());

            set = new CharSeq("1222222222222222222".ToCharArray());
            Assert.Equal("12", set.ToString());

            set = new CharSeq("000000987654321111111111".ToCharArray());
            Assert.Equal("0123456789", set.ToString());
        }
Exemple #2
0
        public void Distinct2()
        {
            var set = new CharSeq("");

            Assert.Equal("", set.ToString());

            set = new CharSeq("1");
            Assert.Equal("1", set.ToString());

            set = new CharSeq("11");
            Assert.Equal("1", set.ToString());

            set = new CharSeq("1223345667899");
            Assert.Equal("123456789", set.ToString());

            set = new CharSeq("0000000000000000000000000");
            Assert.Equal("0", set.ToString());

            set = new CharSeq("0111111111111111111111111112");
            Assert.Equal("012", set.ToString());

            set = new CharSeq("111111111111111112");
            Assert.Equal("12", set.ToString());

            set = new CharSeq("1222222222222222222");
            Assert.Equal("12", set.ToString());

            set = new CharSeq("000000987654321111111111");
            Assert.Equal("0123456789", set.ToString());
        }