public void Remove() { var dictionary = new DictionaryNoAlloc <string, int>(10); dictionary.Add("MyValue", 10); Assert.False(dictionary.Remove("NotUsedValue")); Assert.True(dictionary.Remove("MyValue")); }
public void HashClashSevereDuplicated() { var dictionary = new DictionaryNoAlloc <HashableKey, int>(3); dictionary.Add(new HashableKey("A", 1), 10); dictionary.Add(new HashableKey("B", 1), 12); dictionary.Remove(new HashableKey("A", 1)); Assert.AreEqual(12, dictionary[new HashableKey("B", 1)]); }