示例#1
0
 def test_no_intersect_with_values_unsorted(self):
     res = intersection(10, 5, 4, 2)
     self.assertEqual(res, False)
示例#2
0
 def test_no_intersect_with_negative_values(self):
     res = intersection(-10, -5, -3, -1)
     self.assertEqual(res, False)
示例#3
0
 def test_intersect_with_negative_values(self):
     res = intersection(-10, -5, -6, -1)
     self.assertEqual(res, True)
示例#4
0
 def test_intersect_with_values_with_same_values(self):
     res = intersection(2, 3, 2, 6)
     self.assertEqual(res, True)
示例#5
0
 def test_intersect_with_values_sorted(self):
     res = intersection(2, 5, 4, 8)
     self.assertEqual(res, True)
示例#6
0
 def test_intersect_with_values_unsorted(self):
     res = intersection(8, 5, 9, 6)
     self.assertEqual(res, True)
示例#7
0
 def test_no_intersect_with_values_with_same_values(self):
     res = intersection(2, 2, 3, 4)
     self.assertEqual(res, False)
示例#8
0
 def test_no_intersect_with_values_sorted(self):
     res = intersection(1, 2, 3, 4)
     self.assertEqual(res, False)