Exemple #1
0
 def test64Bit(self):
     """Test a 64-bit splice."""
     self.assertEquals(tournament.splice(1124935821487799207, 0, 32),
         261919531)
Exemple #2
0
 def testBitSpliceAtFour(self):
     """Validating pulling out some bits at position four works."""
     self.assertEquals(tournament.splice(38384, 4, 4, 16), 5)
Exemple #3
0
 def testBitSpliceAtZero8Bit(self):
     """Validating 8-bit style"""
     self.assertEquals(tournament.splice(38384, 0, 8, 8), 240)
Exemple #4
0
 def testBitSpliceAtZero(self):
     """Validating pulling out some bits at position zero works."""
     self.assertEquals(tournament.splice(38384, 0, 4, 16), 9)
Exemple #5
0
 def test64Bit(self):
     """Test a 64-bit splice."""
     self.assertEquals(tournament.splice(1124935821487799207, 0, 32),
                       261919531)
Exemple #6
0
 def testBitSpliceAtZero8Bit(self):
     """Validating 8-bit style"""
     self.assertEquals(tournament.splice(38384, 0, 8, 8), 240)
Exemple #7
0
 def testBitSpliceAtFour(self):
     """Validating pulling out some bits at position four works."""
     self.assertEquals(tournament.splice(38384, 4, 4, 16), 5)
Exemple #8
0
 def testBitSpliceAtZero(self):
     """Validating pulling out some bits at position zero works."""
     self.assertEquals(tournament.splice(38384, 0, 4, 16), 9)