16 references to ToReadOnlyDictionary
Microsoft.CodeAnalysis.UnitTests (16)
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (16)
49IDictionary<int, int> map = this.Empty<int, int>().Add(5, 3).ToReadOnlyDictionary(); 56IDictionary<int, int> map = this.Empty<int, int>().ToReadOnlyDictionary(); 63IDictionary<int, int> map = this.Empty<int, int>().ToReadOnlyDictionary(); 79Assert.True(Empty<int, int>().ToReadOnlyDictionary().Equals(Empty<int, int>())); 80Assert.True(Empty<int, int>().Equals(Empty<int, int>().ToReadOnlyDictionary())); 81Assert.True(Empty<int, int>().ToReadOnlyDictionary().Equals(Empty<int, int>().ToReadOnlyDictionary())); 82Assert.False(Empty<int, int>().Add(3, 1).ToReadOnlyDictionary().Equals(Empty<int, int>())); 83Assert.False(Empty<int, int>().Equals(Empty<int, int>().Add(3, 1).ToReadOnlyDictionary())); 84Assert.False(Empty<int, int>().ToReadOnlyDictionary().Equals(Empty<int, int>().Add(3, 1).ToReadOnlyDictionary())); 100jointMap = map2.AddRange(map.ToReadOnlyDictionary()); 211Assert.Equal(0, map.ToReadOnlyDictionary().Keys.Count()); 215Assert.Equal(1, nonEmpty.ToReadOnlyDictionary().Keys.Count()); 222Assert.Equal(0, map.ToReadOnlyDictionary().Values.Count()); 226Assert.Equal(1, nonEmpty.ToReadOnlyDictionary().Values.Count());