コード例 #1
0
 private static void AssertLess(Bound <int> a, Bound <int> b)
 {
     Assert.True(a.CompareTo(b) < 0);
     Assert.True(BoundComparer <int> .Default.Compare(a, b) < 0);
     Assert.True(b.CompareTo(a) > 0);
     Assert.True(BoundComparer <int> .Default.Compare(b, a) > 0);
 }
コード例 #2
0
 private static void AssertEquals(Bound <int> a, Bound <int> b)
 {
     Assert.True(a == b);
     Assert.True(b == a);
     Assert.True(BoundComparer <int> .Default.Equals(a, b));
     Assert.True(BoundComparer <int> .Default.Equals(b, a));
     Assert.True(a.Equals(b));
     Assert.True(b.Equals(a));
     Assert.Equal(0, a.CompareTo(b));
     Assert.Equal(0, b.CompareTo(a));
     Assert.Equal(a.GetHashCode(), b.GetHashCode());
 }