Exemple #1
0
        public void ImList_2_Add(int cnt)
        {
            var l = new ImList <D>();

            for (int idx = 0; idx < cnt; idx++)
            {
                l = l.Add(new D(idx + 1));
            }
            Assert.Equal(cnt, l.Count);
            var arr = l.ToArray();

            Assert.Equal(cnt, arr.Length);
            for (int idx = 0; idx < cnt; idx++)
            {
                Assert.Equal(idx + 1, arr[idx].Data1);
            }
        }