diff options
author | Jon Skeet <skeet@pobox.com> | 2009-06-05 22:49:05 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2009-06-05 22:49:05 +0100 |
commit | 8729cf46284633bb7c9e7dfff57fea74510b8121 (patch) | |
tree | b33b90ce214ec2c7957a6a93d654f4974804995e /src/ProtocolBuffers.Test/Collections | |
parent | d6dd0a45608ffc34d53a60cc3db33cb38e6c2a18 (diff) | |
download | protobuf-8729cf46284633bb7c9e7dfff57fea74510b8121.tar.gz protobuf-8729cf46284633bb7c9e7dfff57fea74510b8121.tar.bz2 protobuf-8729cf46284633bb7c9e7dfff57fea74510b8121.zip |
Added the ability to use an IEnumerable<T> when adding to a list, so you can do:
new Foo.Builder {
RepeatedValue = { x.Select(y) }
};
... a bit like LINQ to XML.
Diffstat (limited to 'src/ProtocolBuffers.Test/Collections')
-rw-r--r-- | src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs index 2cb25093..94d7fd2f 100644 --- a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs +++ b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs @@ -16,6 +16,7 @@ namespace Google.ProtocolBuffers.Collections { AssertNotSupported(() => list.Insert(0, "")); AssertNotSupported(() => list.Remove("")); AssertNotSupported(() => list.RemoveAt(0)); + AssertNotSupported(() => list.Add(new[] {"", ""})); } [Test] |