Esempio n. 1
0
 def test_char(self):
     self.failUnlessEqual(cdata.char(self.ZERO(1)), 0)
     self.failUnlessEqual(cdata.char(self.LEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.BEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.NEGONE(1)), -1)
     self.assertTrue(cdata.char is cdata.int8)
     self.assertTrue(cdata.to_char is cdata.to_int8)
     self.assertTrue(cdata.char_from is cdata.int8_from)
Esempio n. 2
0
 def test_char(self):
     self.failUnlessEqual(cdata.char(self.ZERO(1)), 0)
     self.failUnlessEqual(cdata.char(self.LEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.BEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.NEGONE(1)), -1)
     self.assertTrue(cdata.char is cdata.int8)
     self.assertTrue(cdata.to_char is cdata.to_int8)
     self.assertTrue(cdata.char_from is cdata.int8_from)
Esempio n. 3
0
 def test_char(self):
     self.failUnlessEqual(cdata.char(self.ZERO(1)), 0)
     self.failUnlessEqual(cdata.char(self.LEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.BEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.NEGONE(1)), -1)
     self.assertTrue(cdata.char is cdata.int8)
     self.assertTrue(cdata.to_char is cdata.to_int8)
     self.assertTrue(cdata.char_from is cdata.int8_from)
     assert cdata.int8_max == 2**7 - 1
     assert cdata.int8_min == -2**7
     assert cdata.int8_max == cdata.char_max
     assert cdata.int8_min == cdata.char_min
Esempio n. 4
0
 def test_char(self):
     self.failUnlessEqual(cdata.char(self.ZERO(1)), 0)
     self.failUnlessEqual(cdata.char(self.LEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.BEONE(1)), 1)
     self.failUnlessEqual(cdata.char(self.NEGONE(1)), -1)
     self.assertTrue(cdata.char is cdata.int8)
     self.assertTrue(cdata.to_char is cdata.to_int8)
     self.assertTrue(cdata.char_from is cdata.int8_from)
     assert cdata.int8_max == 2 ** 7 - 1
     assert cdata.int8_min == - 2 ** 7
     assert cdata.int8_max == cdata.char_max
     assert cdata.int8_min == cdata.char_min