2010-04-02 Jb Evain <jbevain@novell.com>
authorJb Evain <jbevain@gmail.com>
Fri, 2 Apr 2010 12:29:14 +0000 (12:29 -0000)
committerJb Evain <jbevain@gmail.com>
Fri, 2 Apr 2010 12:29:14 +0000 (12:29 -0000)
* SortedSetTest.cs: add tests for Min and Max.

svn path=/trunk/mcs/; revision=154715

mcs/class/System/Test/System.Collections.Generic/ChangeLog
mcs/class/System/Test/System.Collections.Generic/SortedSetTest.cs

index 18d73ccab026d3bae7b9ba87d14986e7d38e6fa8..3f95b6c80e6afc0f0f83081b3ca1b09ce6b95f21 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-02  Jb Evain  <jbevain@novell.com>
+
+       * SortedSetTest.cs: add tests for Min and Max.
+
 2010-04-02  Jb Evain  <jbevain@novell.com>
 
        * SortedSetTest.cs: add test for RemoveWhere.
index 7d96d337acc1b4276254d3e15dfec386a91a690e..d902ab25d0461fc50c452406ca82eb5dade567f8 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-//
+// 
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-//
+// 
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -129,6 +129,20 @@ namespace MonoTests.System.Collections.Generic
                        Assert.IsTrue (set.SequenceEqual (new [] { 1, 3, 5 }));
 
                }
+
+               [Test]
+               public void Max ()
+               {
+                       var set = new SortedSet<int> { 1, 3, 12, 9 };
+                       Assert.AreEqual (12, set.Max);
+               }
+
+               [Test]
+               public void Min ()
+               {
+                       var set = new SortedSet<int> { 2, 3, 1, 9 };
+                       Assert.AreEqual (1, set.Min);
+               }
        }
 }