public void llist2_Init_error() { LList2 ll = new LList2(); ll.Init(new int[] { 1, 2, 9, 5, 6, 2 }); LList1 al1 = new LList1(); al1.Init(new int[] { 1, 2, 9, 5, 6, 2 }); // llist al1 = new llist(new int[] { 1, 2, 9, 5, 6, 2 }); Assert.AreEqual(ll.ToString(), al1.ToString()); //Assert.AreEqual("1 2 9 5 6 ", al.ToString()); }
public void TestEnumerator_LList1(int[] ini, int[] expected) { LList1 list = new LList1(); list.Init(ini); int[] actual = new int[ini.Length]; int iterator = 0; foreach (var item in list) { actual[iterator++] = (int)item; } CollectionAssert.AreEqual(actual, expected); }