Пример #1
0
 def test_0hex_to_0dec(self):
     ans = hexadecimal_to_decimal('0')
     self.assertEqual(ans, '0')
Пример #2
0
 def test_1hex_to_1dec(self):
     ans = hexadecimal_to_decimal('1')
     self.assertEqual(ans, '1')
Пример #3
0
 def test_F5Dhex_to_3933dec(self):
     ans = hexadecimal_to_decimal('F5D')
     self.assertEqual(ans, '3933')
Пример #4
0
 def test_FFFFhex_to_65535dec(self):
     ans = hexadecimal_to_decimal('FFFF')
     self.assertEqual(ans, '65535')
Пример #5
0
 def test_8BAhex_to_139dec(self):
     ans = hexadecimal_to_decimal('8BA')
     self.assertEqual(ans, '2234')
Пример #6
0
 def test_4D2hex_to_1234dec(self):
     ans = hexadecimal_to_decimal('4D2')
     self.assertEqual(ans, '1234')
Пример #7
0
 def test_8Bhex_to_139dec(self):
     ans = hexadecimal_to_decimal('8B')
     self.assertEqual(ans, '139')
Пример #8
0
 def test_82hex_to_130dec(self):
     ans = hexadecimal_to_decimal('82')
     self.assertEqual(ans, '130')
Пример #9
0
 def test_1Ahex_to_26dec(self):
     ans = hexadecimal_to_decimal('1A')
     self.assertEqual(ans, '26')
Пример #10
0
 def test_Ahex_to_10dec(self):
     ans = hexadecimal_to_decimal('A')
     self.assertEqual(ans, '10')
Пример #11
0
 def test_5hex_to_5dec(self):
     ans = hexadecimal_to_decimal('5')
     self.assertEqual(ans, '5')