示例#1
0
 def test_set_value(self):
     self.word = bullet.btQuadWord(1, 1, 1)
     self.word.set_value(2, 2, 2)
     self.assertEqual(self.word, bullet.btQuadWord(2, 2, 2))
     self.assertEqual(self.word.w, 0)
     self.word.set_value(5, 5, 5, 5)
     self.assertEqual(self.word, bullet.btQuadWord(5, 5, 5, 5))
     self.assertEqual(self.word.w, 5)
示例#2
0
 def test_minmax(self):
     self.word = bullet.btQuadWord(4, 2, 3)
     self.word.set_min(bullet.btQuadWord(1, 3, 2))
     self.assertEqual(self.word, bullet.btQuadWord(1, 2, 2))
     self.word.set_max(bullet.btQuadWord(3, 5, 1))
     self.assertEqual(self.word, bullet.btQuadWord(3, 5, 2))
示例#3
0
 def test_str(self):
     self.word = bullet.btQuadWord(1, 1, 1)
     s = str(self.word)
     self.assertEqual(s, "(1, 1, 1, 0)")
示例#4
0
 def test_eq(self):
     self.word = bullet.btQuadWord(1, 1, 1)
     self.assertEqual(self.word, bullet.btQuadWord(1, 1, 1))
     self.assertFalse(self.word != bullet.btQuadWord(1, 1, 1))
示例#5
0
 def test_constructors(self):
     self.word = bullet.btQuadWord(0, 0, 0)
     self.word = bullet.btQuadWord(0, 0, 0, 0)
示例#6
0
 def setUp(self):
     self.word = bullet.btQuadWord()