create methods with binaries and extend them later
Binary is new jump target for function call
This commit is contained in:
@ -64,5 +64,10 @@ module Parfait
|
||||
@code.set_word(20,1)
|
||||
assert_equal 1 , @code.get_word(20)
|
||||
end
|
||||
def test_extend
|
||||
@code.extend_to(20)
|
||||
assert @code.next
|
||||
assert_nil @code.next.next
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,6 +3,7 @@ require_relative "../helper"
|
||||
class TestMethod < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Risc.machine.boot
|
||||
obj = Parfait.object_space.get_class_by_name(:Object).instance_type
|
||||
args = Parfait::Type.for_hash( obj.object_class , { bar: :Integer , foo: :Type})
|
||||
frame = Parfait::Type.for_hash( obj.object_class , { local_bar: :Integer , local_foo: :Type})
|
||||
@ -90,5 +91,7 @@ class TestMethod < MiniTest::Test
|
||||
index = @method.has_local(:local_bar)
|
||||
assert_equal :Integer , @method.frame_type(index)
|
||||
end
|
||||
|
||||
def test_created_with_binary
|
||||
assert @method.binary
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user