示例#1
0
 def test_hex_to_decimal_number1(self):
     number = Hex('A')
     self.assertEqual(number, 10)
示例#2
0
 def test_hex_to_decimal_number0(self):
     number = Hex('5')
     self.assertEqual(number, 5)
示例#3
0
 def test_hex_to_decimal_number6(self):
     number = Hex('-5')
     self.assertEqual(number, 0)
示例#4
0
 def test_hex_to_decimal_number4(self):
     number = Hex('4D2')
     self.assertEqual(number, 1234)
示例#5
0
 def test_hex_to_decimal_number3(self):
     number = Hex('FFF')
     self.assertEqual(number, 4095)
示例#6
0
 def test_hex_to_decimal_number2(self):
     number = Hex('C')
     self.assertEqual(number, 12)