fix and test class definition
This commit is contained in:
parent
7a690cd38d
commit
12e31f28c2
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user