rename locals to frame

includes temps and tradition
This commit is contained in:
Torsten Ruger
2018-03-14 17:39:04 +05:30
parent 83d957377e
commit 2aa7d37a83
10 changed files with 39 additions and 27 deletions

View File

@ -22,7 +22,7 @@ module Parfait
assert_equal Message , @mess.next_message.class
end
def test_locals
assert_equal NamedList , @mess.locals.class
assert_equal NamedList , @mess.frame.class
end
def test_arguments
assert_equal NamedList , @mess.arguments.class

View File

@ -5,7 +5,7 @@ class TestNamedLists < MiniTest::Test
def setup
Risc.machine.boot
@space = Parfait.object_space
@named_list = @space.first_message.locals
@named_list = @space.first_message.frame
@type = @named_list.get_type
end

View File

@ -95,7 +95,7 @@ class TestSpace < MiniTest::Test
all = []
while mess
all << mess
assert mess.locals
assert mess.frame
mess = mess.next_message
end
assert_equal all.length , all.uniq.length

View File

@ -56,8 +56,8 @@ class TestMethod < MiniTest::Test
end
def test_local1
assert_equal 2 , @method.locals_length , @method.locals.inspect
assert_equal Symbol , @method.locals.names.first.class
assert_equal 2 , @method.frame_length , @method.frame.inspect
assert_equal Symbol , @method.frame.names.first.class
assert_equal :local_bar , @method.locals_name(1)
end
@ -68,7 +68,7 @@ class TestMethod < MiniTest::Test
def test_add_local
@method.add_local(:foo2 , :Object)
assert_equal 3 , @method.locals_length
assert_equal 3 , @method.frame_length
assert_equal :foo2 , @method.locals_name(3)
assert_equal :Object , @method.locals_type(3)
end