fix and test class definition

This commit is contained in:
Torsten Ruger 2015-10-25 12:31:35 +02:00
parent 7a690cd38d
commit 12e31f28c2
3 changed files with 11 additions and 6 deletions

View File

@ -22,7 +22,7 @@ module Parfait
class Class < Object
attributes [:object_layout , :name , :instance_methods , :super_class , :meta_class]
def initialize name , super_class
def initialize name , superclass
super()
self.name = name
self.instance_methods = List.new

View File

@ -2,7 +2,7 @@
require_relative "test_if"
#require_relative "test_foo"
#require_relative "test_hello"
#require_relative "test_class"
require_relative "test_class"
#require_relative "test_putint"
#require_relative "test_functions"
#require_relative "test_recursive_fibo"

View File

@ -1,19 +1,24 @@
require_relative 'helper'
module Register
class TestBasicClass < MiniTest::Test
include Fragments
def test_class_basic
def test_class_def
@string_input = <<HERE
class Bar
int buh()
return 1
end
end
class Object
int main()
return 1
end
end
HERE
@expect = [ [SaveReturn] ,[RegisterTransfer,GetSlot,FunctionReturn]]
@length = 16
check
end
end
end