public void FSharpSetTest_2_Success()
        {
            var collection = new FSharpSet <int>(Enumerable.Empty <int>());

            collection = collection.Add(0);
            collection = collection.Add(1);
            var target = this.CreateTarget <FSharpSet <int> >();

            using (var buffer = new MemoryStream())
            {
                target.Pack(buffer, collection);
                buffer.Position = 0;
                var unpacked = target.Unpack(buffer);
                buffer.Position = 0;
                Assert.That(unpacked.ToArray(), Is.EqualTo(collection.ToArray()));
            }
        }
Example #2
0
 public Set1 <T> Add(T t) => new Set1 <T>(Contents.Add(t));