예제 #1
0
 public void Sort()
 {
     comparator_count = 0;
     using (var obj1 = new NSObject())
         using (var obj2 = new NSObject())
             using (var a = new NSMutableArray()) {
                 a.Add(obj1);
                 a.Add(a);
                 a.Add(obj2);
                 using (var s = a.Sort(Comparator)) {
                     Assert.That((long)(IntPtr)s.ValueAt(0), Is.GreaterThan((long)(IntPtr)s.ValueAt(1)), "0");
                     Assert.That((long)(IntPtr)s.ValueAt(1), Is.GreaterThan((long)(IntPtr)s.ValueAt(2)), "1");
                 }
             }
     Assert.That(comparator_count, Is.GreaterThanOrEqualTo(2), "2+");
 }