Esempio n. 1
0
 public void AList2_Init_error()
 {
     AList2 al = new AList2();
     al.Init(new int[] { 1, 2, 9, 5, 6, 2 });
     AList2 al1 = new AList2();
     al1.Init(new int[] { 1, 2, 9, 5, 6, 2 });
    // AList2 al1 = new AList2(new int[] { 1, 2, 9, 5, 6, 2 });
     Assert.AreEqual(al.ToString(), al1.ToString());
     //Assert.AreEqual("1 2 9 5 6 ", al.ToString());
 }
Esempio n. 2
0
 public void AList2_Delete_Position_DeleteValue_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.DeletePos(3);
     Assert.AreEqual("1 2 9 6 7 ", al.ToString());
 }
Esempio n. 3
0
 public void AList2_Delete_Start_DeleteValue_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.DeleteStart();
     Assert.AreEqual("2 9 5 6 7 ", al.ToString());
 }
Esempio n. 4
0
 public void AList2_AddStart_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.AddStart(42);
     Assert.AreEqual("42 1 2 9 5 6 7 ", al.ToString());
 }
Esempio n. 5
0
 public void AList2_AddPosition_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.AddPosition(42, 4);
     Assert.AreEqual("1 2 9 5 42 6 7 ", al.ToString());
 }
Esempio n. 6
0
 public void AList2_Delete_End_DeleteValue_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.DeleteEnd();
     Assert.AreEqual("1 2 9 5 6 ", al.ToString());
 }
Esempio n. 7
0
 public void AList2_AddEnd_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.AddEnd(42);
     Assert.AreEqual("1 2 9 5 6 7 42 ", al.ToString());
 }
Esempio n. 8
0
 public void AList2_Half_Reverse_odd_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.HalfReverse();
     Assert.AreEqual("9 2 1 5 6 7 ", al.ToString());
 }
Esempio n. 9
0
 public void AList2_Sort_error()
 {
     AList2 al = new AList2(new int[] { 2, 1, 9, 5, 6, 7 });
     al.Sort();
     Assert.AreEqual("1 2 5 6 7 9 ", al.ToString());
 }
Esempio n. 10
0
 public void AList2_Set_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.Set(42, 3);
     Assert.AreEqual("1 2 9 42 6 7 ", al.ToString());
 }
Esempio n. 11
0
 public void AList2_Reverse_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     al.Reverse();
     Assert.AreEqual("7 6 5 9 2 1 ", al.ToString());
 }
Esempio n. 12
0
 public void AList2_Min_Index_error()
 {
     AList2 al = new AList2(new int[] { 1, 2, 9, 5, 6, 7 });
     Assert.AreEqual(0, al.MinIndex());
 }