mirror of
https://github.com/mnaberez/py65.git
synced 2024-09-12 05:54:47 +00:00
Add test for unsupported base. Refs #36
This commit is contained in:
parent
c5e01ad788
commit
9d8957e32b
@ -16,6 +16,9 @@ class ConversionsTopLevelTests(unittest.TestCase):
|
|||||||
self.assertEqual('1010', itoa(10, base=2))
|
self.assertEqual('1010', itoa(10, base=2))
|
||||||
self.assertEqual('-1010', itoa(-10, base=2))
|
self.assertEqual('-1010', itoa(-10, base=2))
|
||||||
|
|
||||||
|
def test_itoa_unsupported_base(self):
|
||||||
|
self.assertRaises(ValueError, itoa, 0, base=17)
|
||||||
|
|
||||||
def test_convert_to_bin(self):
|
def test_convert_to_bin(self):
|
||||||
self.assertEqual(0, convert_to_bin(0))
|
self.assertEqual(0, convert_to_bin(0))
|
||||||
self.assertEqual(99, convert_to_bin(0x99))
|
self.assertEqual(99, convert_to_bin(0x99))
|
||||||
|
Loading…
Reference in New Issue
Block a user