more some tests

This commit is contained in:
Torsten Ruger 2015-11-30 16:10:08 +02:00
parent 19dd7b96d6
commit afe16868b5
3 changed files with 32 additions and 7 deletions

View File

@ -1,7 +1,6 @@
class Layout < Object
Class object_class()
return self.object_class
end
field Class object_class
field List instance_methods
field Integer indexed_length
end

View File

@ -6,7 +6,12 @@ class Object
Class get_class()
Layout l = self.layout
return l.object_class()
return l.object_class
end
Word get_class_name()
Layout l = self.layout
Class c = l.object_class
return c.name
end
end

View File

@ -25,13 +25,34 @@ class TestLayoutRT < MiniTest::Test
def test_puts_class
@main = <<HERE
Class c = get_class()
Word w = c.get_name()
Word w = get_class_name()
w.putstring()
HERE
@stdout = "Space"
check
end
def test_puts_layout_space
@main = <<HERE
Layout l = get_layout()
Word w = l.get_class_name()
w.putstring()
HERE
@stdout = "Layout"
check
end
# copy of register parfait tests, in order
def test_message_layout
@main = <<HERE
Message m = self.first_message
m = m.next_message
Word w = m.get_class_name()
w.putstring()
HERE
@stdout = "Message"
check
end
end