From afe16868b5fbe62ddadc96e377bb7635596543bc Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 30 Nov 2015 16:10:08 +0200 Subject: [PATCH] more some tests --- lib/soml/parfait/layout.soml | 7 +++---- lib/soml/parfait/object.soml | 7 ++++++- test/soml/parfait/test_layout.rb | 25 +++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/lib/soml/parfait/layout.soml b/lib/soml/parfait/layout.soml index 33677d42..88329a78 100644 --- a/lib/soml/parfait/layout.soml +++ b/lib/soml/parfait/layout.soml @@ -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 diff --git a/lib/soml/parfait/object.soml b/lib/soml/parfait/object.soml index 97ad272e..16503089 100644 --- a/lib/soml/parfait/object.soml +++ b/lib/soml/parfait/object.soml @@ -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 diff --git a/test/soml/parfait/test_layout.rb b/test/soml/parfait/test_layout.rb index 5de92157..b10b0480 100644 --- a/test/soml/parfait/test_layout.rb +++ b/test/soml/parfait/test_layout.rb @@ -25,13 +25,34 @@ class TestLayoutRT < MiniTest::Test def test_puts_class @main = <