Ejemplo n.º 1
0
 def test_if_in_previous_triangle_then_true(self):
     s = Solver(7)
     self.assertEqual(True, s.inside_triangle(4, 0, 2))
     self.assertEqual(True, s.inside_triangle(4, 0, 4))
     self.assertEqual(True, s.inside_triangle(4, 1, 3))
     self.assertEqual(True, s.inside_triangle(4, 2, 2))
     self.assertEqual(True, s.inside_triangle(4, 3, 1))
Ejemplo n.º 2
0
 def test_if_not_in_previous_triangle_then_false(self):
     s = Solver(7)
     self.assertEqual(False, s.inside_triangle(4, 0, 6))
     self.assertEqual(False, s.inside_triangle(4, 1, 5))
     self.assertEqual(False, s.inside_triangle(4, 2, 4))
     self.assertEqual(False, s.inside_triangle(4, 3, 3))