Пример #1
0
 def test_equals(self):
     v = Vector(3, 2, 5)
     b = Vector(4, 1, 2)
     v2 = Vector(3, 2, 5)
     vb = v.equals(b)
     vv = v.equals(v2)
     self.assertFalse(vb)
     self.assertTrue(vv)
Пример #2
0
 def test_negative(self):
     v = Vector(3, 2, 5)
     b = Vector(-3, -2, -5)
     v2 = Vector(-1, 2, 3)
     v3 = Vector(1, -2, -3)
     vb = v.equals(b.getNegative())
     vv = v2.equals(v3.getNegative())
     self.assertTrue(vb)
     self.assertTrue(vv)