Exemple #1
0
 def testKnownValues(self):
     for known_bytes, endianness, numberofbits, startbit, input_busvalue in self.knownValues:
         result_shiftedvalue = utilities.get_shiftedvalue_from_busvalue(
             input_busvalue, endianness, numberofbits, startbit)
         self.assertEqual(result_shiftedvalue,
                          utilities.can_bytes_to_int(known_bytes))
 def testKnownValues(self):
     for known_bytes, endianness, numberofbits, startbit, input_busvalue in self.knownValues:
         result_shiftedvalue = utilities.get_shiftedvalue_from_busvalue(input_busvalue, endianness, numberofbits, startbit)
         self.assertEqual(result_shiftedvalue, utilities.can_bytes_to_int(known_bytes))
Exemple #3
0
 def testKnownValues(self):
     for inputvalue, knownresult in self.knownValues:
         result = utilities.can_bytes_to_int(inputvalue)
         self.assertEqual(result, knownresult)
 def testKnownValues(self):
     for inputvalue, knownresult in self.knownValues:
         result = utilities.can_bytes_to_int(inputvalue)
         self.assertEqual(result, knownresult)