more some tests
This commit is contained in:
parent
19dd7b96d6
commit
afe16868b5
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user