예제 #1
0
 def test_ortho_right_interior_pt_ct_upper_left(self):
     p1 = IntegerPoint(0, 0)
     p2 = IntegerPoint(0, 4)
     p3 = IntegerPoint(6, 4)
     t1 = IntegerTriangle(p1, p2, p3)
     self.assertEqual(t1.interior_pt_ct(), 7)
예제 #2
0
 def test_common_edge_interior_pt_ct_right(self):
     p1 = IntegerPoint(5, 0)
     p2 = IntegerPoint(0, 2)
     p3 = IntegerPoint(5, 4)
     t1 = IntegerTriangle(p1, p2, p3)
     self.assertEqual(t1.interior_pt_ct(), 8)
예제 #3
0
 def test_interior_pt_ct_lower_right_interior_vertex(self):
     p1 = IntegerPoint(0, 0)
     p2 = IntegerPoint(3, 1)
     p3 = IntegerPoint(4, 5)
     t1 = IntegerTriangle(p1, p2, p3)
     self.assertEqual(t1.interior_pt_ct(), 5)
예제 #4
0
 def test_common_edge_interior_pt_ct_bottom(self):
     p1 = IntegerPoint(0, 0)
     p2 = IntegerPoint(2, 4)
     p3 = IntegerPoint(5, 0)
     t1 = IntegerTriangle(p1, p2, p3)
     self.assertEqual(t1.interior_pt_ct(), 7)
예제 #5
0
 def test_interior_pt_ct_no_interior_vertex(self):
     p1 = IntegerPoint(0, 0)
     p2 = IntegerPoint(5, 2)
     p3 = IntegerPoint(2, 5)
     t1 = IntegerTriangle(p1, p2, p3)
     self.assertEqual(t1.interior_pt_ct(), 9)