예제 #1
0
        public void TestTryGetKey()
        {
            ImmutableSortedTreeDictionary <int, int> .Builder dictionary = ImmutableSortedTreeDictionary.CreateBuilder <int, int>();
            Assert.False(dictionary.TryGetKey(0, out var key));
            Assert.Equal(0, key);

            dictionary.Add(1, 2);
            Assert.True(dictionary.TryGetKey(1, out key));
            Assert.Equal(1, key);
        }