Browse Source

Starting on test funcs

master
Raphael Roberts 6 years ago
parent
commit
51b58b07b3
  1. 57
      test.py

57
test.py

@ -1,8 +1,53 @@
from register import Accumulator
a = Accumulator(8)
a.carry_flag = True
a.set(8)
print(a)
a.shift_right(True)
print(a)
TESTS = []
def test(func):
global TESTS
TESTS.append(func)
return func
@test
def test_set():
pass
@test
def test_get():
pass
@test
def test_get_signed():
pass
@test
def test_negate():
pass
@test
def test_shift_right():
pass
@test
def test_shift_left():
pass
@test
def test_add():
pass
@test
def test_subtract():
pass
if __name__ == "__main__":
for test_func in TESTS:
test_func()
Loading…
Cancel
Save