Exemplo n.º 1
0
        public void TestIndexOf()
        {
            ShortList list = new ShortList();

            for (short j = 0; j < 1000; j++)
            {
                list.Add((short)(j / 2));
            }
            for (short j = 0; j < 1000; j++)
            {
                if (j < 500)
                {
                    Assert.AreEqual(j * 2, list.IndexOf(j));
                }
                else
                {
                    Assert.AreEqual(-1, list.IndexOf(j));
                }
            }
        }