public void IteratorTest() { var arr = UnsafeList.Allocate <int>(10); var itr = UnsafeList.GetEnumerator <int>(arr); for (int i = 0; i < 10; i++) { UnsafeList.Add(arr, i * i); } Assert.AreEqual(10, UnsafeList.GetCount(arr)); int num = 0; foreach (int i in itr) { Assert.AreEqual(num * num, i); num++; } UnsafeList.Free(arr); }