fix interpreter test
This commit is contained in:
parent
642dcb065a
commit
32275f4d48
@ -27,7 +27,7 @@ class AddTest < MiniTest::Test
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert @interpreter.get_register( :r2 )
|
||||
assert @interpreter.get_register( :r2 ).is_a? Integer
|
||||
assert Integer , @interpreter.get_register( :r2 ).class
|
||||
end
|
||||
def test_transfer
|
||||
transfer = ticks 8
|
||||
|
@ -31,7 +31,6 @@ class Integer < Object
|
||||
rest = self - div
|
||||
if_notzero( rest )
|
||||
rest = self.digit( rest )
|
||||
str = str + rest
|
||||
else
|
||||
str = div.add_string(str)
|
||||
end
|
||||
@ -80,7 +79,6 @@ HERE
|
||||
"GetSlot","LoadConstant","OperatorInstruction","IsZero","Label",
|
||||
"LoadConstant","SetSlot","Label","Label","RegisterTransfer",
|
||||
"GetSlot","FunctionReturn","GetSlot","GetSlot","SetSlot",
|
||||
"GetSlot","GetSlot","GetSlot","OperatorInstruction","SetSlot",
|
||||
"Label","GetSlot","SetSlot","Label","RegisterTransfer",
|
||||
"GetSlot","FunctionReturn","GetSlot","SetSlot","Label",
|
||||
"RegisterTransfer","GetSlot","FunctionReturn","GetSlot","Label",
|
||||
|
@ -32,13 +32,13 @@ class TestPuts < MiniTest::Test
|
||||
end
|
||||
def test_load
|
||||
assert_equal Register::LoadConstant , ticks(3).class
|
||||
assert_equal Parfait::Space , Register.machine.objects[ @interpreter.get_register(:r2)].class
|
||||
assert_equal Parfait::Space , @interpreter.get_register(:r2).class
|
||||
assert_equal :r2, @interpreter.instruction.array.symbol
|
||||
end
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert @interpreter.get_register( :r1 )
|
||||
assert @interpreter.get_register( :r1 ).is_a? Integer
|
||||
assert Integer , @interpreter.get_register( :r1 ).class
|
||||
end
|
||||
def test_transfer
|
||||
transfer = ticks 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user