예제 #1
0
        public void ContainsValueTest()
        {
            var set = UnsafeDictionary.Allocate <int, int>(10);

            Assert.IsFalse(UnsafeDictionary.ContainsKey <int>(set, 1));

            UnsafeDictionary.Add(set, 1, 5);
            UnsafeDictionary.Add(set, 2, 2);
            UnsafeDictionary.Add(set, 3, 38);

            Assert.IsTrue(UnsafeDictionary.ContainsValue <int>(set, 2));
            Assert.IsTrue(UnsafeDictionary.ContainsValue <int>(set, 38));
            Assert.IsFalse(UnsafeDictionary.ContainsValue <int>(set, 1));

            UnsafeDictionary.Free(set);
        }