public void KeyIteratorTest() { var set = UnsafeDictionary.Allocate <int, decimal>(10); // Fill set for (int i = 0; i < 10; i++) { // Add in reverse order UnsafeDictionary.Add <int, decimal>(set, i, i * i); } var enumerator = UnsafeDictionary.GetKeyEnumerator <int>(set); for (int i = 0; i < 10; i++) { enumerator.MoveNext(); Assert.AreEqual(i, enumerator.Current); } UnsafeDictionary.Free(set); }