diff options
author | Jon Skeet <skeet@pobox.com> | 2015-07-16 09:34:04 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-07-16 09:34:04 +0100 |
commit | 7ea5239792c3c449e7ae36caa3a9de04b90d0bbe (patch) | |
tree | f1f80ed866d477d9b22d13898ec78dc8a21d5269 /csharp/src/ProtocolBuffers.Test | |
parent | 3bf74a91bb936c71bfbe61db5c87d10eaac1bc41 (diff) | |
parent | 78b452b7acf985747d3d2813dedea3d267b08bae (diff) | |
download | protobuf-7ea5239792c3c449e7ae36caa3a9de04b90d0bbe.tar.gz protobuf-7ea5239792c3c449e7ae36caa3a9de04b90d0bbe.tar.bz2 protobuf-7ea5239792c3c449e7ae36caa3a9de04b90d0bbe.zip |
Merge pull request #610 from jskeet/fix-enumerator
Remove the struct-based iterator for RepeatedField.
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/Collections/RepeatedFieldTest.cs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/Collections/RepeatedFieldTest.cs b/csharp/src/ProtocolBuffers.Test/Collections/RepeatedFieldTest.cs index 6eff8683..25be7731 100644 --- a/csharp/src/ProtocolBuffers.Test/Collections/RepeatedFieldTest.cs +++ b/csharp/src/ProtocolBuffers.Test/Collections/RepeatedFieldTest.cs @@ -241,18 +241,12 @@ namespace Google.Protobuf.Collections var list = new RepeatedField<string> { "first", "second" }; using (var enumerator = list.GetEnumerator()) { - Assert.Throws<InvalidOperationException>(() => enumerator.Current.GetHashCode()); Assert.IsTrue(enumerator.MoveNext()); Assert.AreEqual("first", enumerator.Current); Assert.IsTrue(enumerator.MoveNext()); Assert.AreEqual("second", enumerator.Current); Assert.IsFalse(enumerator.MoveNext()); - Assert.Throws<InvalidOperationException>(() => enumerator.Current.GetHashCode()); Assert.IsFalse(enumerator.MoveNext()); - enumerator.Reset(); - Assert.Throws<InvalidOperationException>(() => enumerator.Current.GetHashCode()); - Assert.IsTrue(enumerator.MoveNext()); - Assert.AreEqual("first", enumerator.Current); } } |