• Home
  • Raw
  • Download

Lines Matching full:keys

100             CollectionAssert.AreEqual(new[] { "a", "c", "d" }, map.Keys);  in AddPreservesInsertionOrder()
179 CollectionAssert.AreEqual(new[] { "before", "x", "a", "after" }, map2.Keys); in Add_Dictionary()
332 // Surprising, but IDictionary.Contains is only about keys. in IDictionary_Contains()
380 CollectionAssert.AreEqual(new[] { "x" }, dictionary.Keys); in IDictionary_Keys()
433 var keys = map.Keys; in KeysReturnsLiveView()
434 CollectionAssert.AreEqual(new string[0], keys); in KeysReturnsLiveView()
437 CollectionAssert.AreEqual(new[] { "foo", "x" }, keys); in KeysReturnsLiveView()
451 // Just test keys - we know the implementation is the same for values
456 var keys = map.Keys; in ViewsAreReadOnly()
457 Assert.IsTrue(keys.IsReadOnly); in ViewsAreReadOnly()
458 Assert.Throws<NotSupportedException>(() => keys.Clear()); in ViewsAreReadOnly()
459 Assert.Throws<NotSupportedException>(() => keys.Remove("a")); in ViewsAreReadOnly()
460 Assert.Throws<NotSupportedException>(() => keys.Add("a")); in ViewsAreReadOnly()
463 // Just test keys - we know the implementation is the same for values
468 var keys = map.Keys; in ViewCopyTo()
470 Assert.Throws<ArgumentException>(() => keys.CopyTo(array, 3)); in ViewCopyTo()
471 Assert.Throws<ArgumentOutOfRangeException>(() => keys.CopyTo(array, -1)); in ViewCopyTo()
472 keys.CopyTo(array, 1); in ViewCopyTo()
476 // Just test keys - we know the implementation is the same for values
481 ICollection keys = map.Keys; in NonGenericViewCopyTo()
484 Assert.Throws<ArgumentException>(() => keys.CopyTo(array, 3)); in NonGenericViewCopyTo()
485 Assert.Throws<ArgumentOutOfRangeException>(() => keys.CopyTo(array, -1)); in NonGenericViewCopyTo()
486 keys.CopyTo(array, 1); in NonGenericViewCopyTo()
494 var keys = map.Keys; in KeysContains()
495 Assert.IsTrue(keys.Contains("foo")); in KeysContains()
496 Assert.IsFalse(keys.Contains("bar")); // It's a value! in KeysContains()
497 Assert.IsFalse(keys.Contains("1")); in KeysContains()
498 // Keys can't be null, so we should prevent contains check in KeysContains()
499 Assert.Throws<ArgumentNullException>(() => keys.Contains(null)); in KeysContains()
506 var keys = map.Keys.ToArray(); // Uses CopyTo internally in KeysCopyTo()
507 CollectionAssert.AreEquivalent(new[] { "foo", "x" }, keys); in KeysCopyTo()
571 // This wouldn't usually happen, as protos can't use doubles as map keys,
609 CollectionAssert.AreEquivalent(new[] { "the_key" }, field.Keys); in AddEntriesFrom_CodedInputStream()
619 ….AreEquivalent(((IDictionary<string, string>)map).Keys, ((IReadOnlyDictionary<string, string>)map)… in IDictionaryKeys_Equals_IReadOnlyDictionaryKeys()