public void TestIndex() { using (var list = new SList <OpaqueInt> ()) { list.Append(new OpaqueInt(1)); list.Append(new OpaqueInt(2)); list.Append(new OpaqueInt(3)); list.Append(new OpaqueInt(4)); // check that finding an item returns the index var index = list.IndexOf(new OpaqueInt(3)); Assert.That(index, Is.EqualTo(2)); // check that not finding an item returns -1 index = list.IndexOf(new OpaqueInt(5)); Assert.That(index, Is.EqualTo(-1)); } Utility.AssertNoGLibLog(); }