You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
riscemu/test/test_helpers.py

16 lines
395 B
Python

from riscemu.helpers import *
2 years ago
def test_align_address():
assert align_addr(3, 1) == 3
assert align_addr(3, 2) == 4
assert align_addr(3, 4) == 4
assert align_addr(3, 8) == 8
assert align_addr(8, 8) == 8
def test_parse_numeric():
2 years ago
assert parse_numeric_argument("13") == 13
assert parse_numeric_argument("0x100") == 256
assert parse_numeric_argument("-13") == -13