type now means class name
update reader (with new type definition) remove type class (now symbol) update all types to class name symbols
This commit is contained in:
@ -10,39 +10,46 @@ module Virtual
|
||||
|
||||
def test_call_main_plain
|
||||
@root = :call_site
|
||||
@string_input = <<HERE
|
||||
main()
|
||||
HERE
|
||||
@string_input = 'main()'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
def test_call_main_int
|
||||
@root = :call_site
|
||||
@string_input = <<HERE
|
||||
main(1)
|
||||
HERE
|
||||
@string_input = 'main(1)'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
def ttest_call_self_main
|
||||
@root = :call_site
|
||||
@string_input = 'self.main()'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
def test_call_main_string
|
||||
@root = :call_site
|
||||
@string_input = <<HERE
|
||||
main("1")
|
||||
HERE
|
||||
@string_input = 'main("1")'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
def ttest_call_main_op
|
||||
Virtual.machine.space.get_main.ensure_local(:bar , :int)
|
||||
Virtual.machine.space.get_main.ensure_local(:bar , :Integer)
|
||||
@root = :call_site
|
||||
@string_input = <<HERE
|
||||
main( bar )
|
||||
HERE
|
||||
@string_input = 'main( bar )'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
def test_call_string_put
|
||||
@root = :call_site
|
||||
@string_input = '"Hello Raisa, I am salama".putstring()'
|
||||
@output = Register::RegisterValue
|
||||
check
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ module Virtual
|
||||
def test_puts
|
||||
@root = :function_definition
|
||||
@string_input = <<HERE
|
||||
int puts(ref str)
|
||||
int puts(Word str)
|
||||
main()
|
||||
end
|
||||
HERE
|
||||
|
Reference in New Issue
Block a user