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

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

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

index bb70814d919193ddaa622c9105cc96f9b8681391..2a4a8a3d63e1e8c071dab1c539e70ffc781dff7d 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-02  Jb Evain  <jbevain@novell.com>
+
+       * SortedSetTest.cs: add tests for Min and Max on subsets.
+
 2010-04-02  Jb Evain  <jbevain@novell.com>
 
        * SortedSetTest.cs: add tests for GetViewBetween.
index dc2bbcd4b5a2f561bfd8ae6ab7b158c62d669c0e..5249d1833ff52cf3e7caffb82248152a313bc9a3 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
@@ -246,6 +246,24 @@ namespace MonoTests.System.Collections.Generic
 
                        Assert.IsTrue (view.SequenceEqual (new [] { 5 }));
                }
+
+               [Test]
+               public void ViewMin ()
+               {
+                       var set = new SortedSet<int> { 1, 3, 5, 7, 9 };
+                       var view = set.GetViewBetween (4, 8);
+
+                       Assert.AreEqual (5, view.Min);
+               }
+
+               [Test]
+               public void ViewMax ()
+               {
+                       var set = new SortedSet<int> { 1, 3, 5, 7, 9 };
+                       var view = set.GetViewBetween (4, 8);
+
+                       Assert.AreEqual (7, view.Max);
+               }
        }
 }