diff --git a/lib/soml/parfait/layout.soml b/lib/soml/parfait/layout.soml index 5d3aa4a9..5e89e5ca 100644 --- a/lib/soml/parfait/layout.soml +++ b/lib/soml/parfait/layout.soml @@ -1,7 +1,7 @@ class Layout < Object Class object_class() - get_internal(1) + get_internal(2) end end diff --git a/lib/soml/parfait/object.soml b/lib/soml/parfait/object.soml index 34934b0d..9c13a320 100644 --- a/lib/soml/parfait/object.soml +++ b/lib/soml/parfait/object.soml @@ -1,7 +1,7 @@ class Object Layout get_layout() - return get_internal(0) + return get_internal(1) end Class get_class() diff --git a/test/interpreter/test_add.rb b/test/interpreter/test_add.rb index 463acd5c..f7ccad9e 100644 --- a/test/interpreter/test_add.rb +++ b/test/interpreter/test_add.rb @@ -38,7 +38,7 @@ class AddTest < MiniTest::Test ret = ticks(18) assert_equal Register::FunctionReturn , ret.class - object = @interpreter.object_for( ret.register ) + object = @interpreter.get_register( ret.register ) link = object.get_internal( ret.index ) assert_equal Register::Label , link.class diff --git a/test/parfait_ruby/test_layout.rb b/test/parfait_ruby/test_layout.rb index 160fa0de..b15c7bec 100644 --- a/test/parfait_ruby/test_layout.rb +++ b/test/parfait_ruby/test_layout.rb @@ -71,6 +71,16 @@ class TestLayout < MiniTest::Test assert_equal layout.first , :layout end + + def test_class_space + space = Register.machine.space + assert_equal Parfait::Space , space.class + layout = space.get_layout + assert_equal Parfait::Layout , layout.class + assert_equal 3 , layout.instance_names.get_length + assert_equal layout.object_class.class , Parfait::Class + assert_equal layout.object_class.name , :Space + end def test_attribute_set @mess.receiver = 55 assert_equal 55 , @mess.receiver