示例#1
0
        public void ReverseTest(int[] enter, int[] expected)
        {
            DoubleLinkedList1 list = new DoubleLinkedList1(enter);

            list.Reverse();
            int[] actualArr = list.ToArray();
            Assert.AreEqual(expected, actualArr);
        }
示例#2
0
        public void AddLastTest1(int[] enter, int[] plus, int[] expected)
        {
            DoubleLinkedList1 list = new DoubleLinkedList1(enter);

            list.AddLast(plus);
            int[] actualArr = list.ToArray();
            Assert.AreEqual(expected, actualArr);
        }
示例#3
0
        public void SetTest(int index, int value, int[] enter, int[] expected)
        {
            DoubleLinkedList1 list = new DoubleLinkedList1(enter);

            list.Set(index, value);
            int[] actualArr = list.ToArray();
            Assert.AreEqual(expected, actualArr);
        }
示例#4
0
        public void AddAt1Test(int index, int[] arr, int[] vals, int[] expected)
        {
            DoubleLinkedList1 list = new DoubleLinkedList1(arr);

            list.AddAt(index, vals);
            int[] actualArr = list.ToArray();
            Assert.AreEqual(expected, actualArr);
        }