public static void RemoveAll()
        {
            var dict = new CompactDictionary <string, int>(null, 16)
            {
                { "a", 1 },
                { "b", 2 },
                { "c", 3 },
                { "d", 4 }
            };
            var result1 = dict.RemoveAll(new[] { "a", "c", "e" }, out var removedKeys1, out var removedValues1);

            Assert.AreEqual(2, result1);
            Assert.AreEqual(false, dict.ContainsValue(1));
            Assert.AreEqual(true, dict.ContainsValue(2));
            Assert.AreEqual(false, dict.ContainsValue(3));
            Assert.AreEqual(true, dict.ContainsValue(4));
            Assert.AreEqual(false, dict.ContainsKey("a"));
            Assert.AreEqual(true, dict.ContainsKey("b"));
            Assert.AreEqual(false, dict.ContainsKey("c"));
            Assert.AreEqual(true, dict.ContainsKey("d"));
            Assert.AreEqual(new[] { "a", "c" }, removedKeys1);
            Assert.AreEqual(new[] { 1, 3 }, removedValues1);
            var result2 = dict.RemoveAll(new[] { "a", "c", "e" }, out var removedKeys2, out var removedValues2);

            Assert.AreEqual(0, result2);
            Assert.AreEqual(Array.Empty <string>(), removedKeys2);
            Assert.AreEqual(Array.Empty <int>(), removedValues2);
            var result3 = dict.RemoveAll(new[] { "b" }, out var removedKeys3, out var removedValues3);

            Assert.AreEqual(1, result3);
            Assert.AreEqual(false, dict.ContainsValue(2));
            Assert.AreEqual(false, dict.ContainsKey("b"));
            Assert.AreEqual(new[] { "b" }, removedKeys3);
            Assert.AreEqual(new[] { 2 }, removedValues3);
        }
        public static void FindValue()
        {
            var dict = new CompactDictionary <string, int>(null, 16)
            {
                { "a", 1 },
                { "b", 2 },
                { "c", 3 },
                { "d", 4 }
            };

            Assert.AreEqual(true, dict.ContainsValue(3));
            Assert.AreEqual(false, dict.ContainsValue(5));
        }