fixing indexes makes test work
forgot my own rule: all parfait works in 1 based lists
This commit is contained in:
parent
a1aa6b58ac
commit
8c68ffc7a4
@ -1,7 +1,7 @@
|
|||||||
class Layout < Object
|
class Layout < Object
|
||||||
|
|
||||||
Class object_class()
|
Class object_class()
|
||||||
get_internal(1)
|
get_internal(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
class Object
|
class Object
|
||||||
|
|
||||||
Layout get_layout()
|
Layout get_layout()
|
||||||
return get_internal(0)
|
return get_internal(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
Class get_class()
|
Class get_class()
|
||||||
|
@ -38,7 +38,7 @@ class AddTest < MiniTest::Test
|
|||||||
ret = ticks(18)
|
ret = ticks(18)
|
||||||
assert_equal Register::FunctionReturn , ret.class
|
assert_equal Register::FunctionReturn , ret.class
|
||||||
|
|
||||||
object = @interpreter.object_for( ret.register )
|
object = @interpreter.get_register( ret.register )
|
||||||
link = object.get_internal( ret.index )
|
link = object.get_internal( ret.index )
|
||||||
|
|
||||||
assert_equal Register::Label , link.class
|
assert_equal Register::Label , link.class
|
||||||
|
@ -71,6 +71,16 @@ class TestLayout < MiniTest::Test
|
|||||||
assert_equal layout.first , :layout
|
assert_equal layout.first , :layout
|
||||||
end
|
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
|
def test_attribute_set
|
||||||
@mess.receiver = 55
|
@mess.receiver = 55
|
||||||
assert_equal 55 , @mess.receiver
|
assert_equal 55 , @mess.receiver
|
||||||
|
Loading…
Reference in New Issue
Block a user