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)
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)
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)
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)
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)