mains tests can include any code

not wrapping as main anymore
(must still include mains)
first part of #11
This commit is contained in:
Torsten Ruger
2018-08-18 19:42:14 +03:00
parent 233b83510f
commit 80264c5322
7 changed files with 52 additions and 24 deletions

View File

@ -92,8 +92,16 @@ module Risc
def get_message_return
@interpreter.get_register(:r8).return_value
end
# wrap the input so it is a main, compile and run it
def run_main(input)
@string_input = as_main(input)
run_input as_main(input)
end
# use the input as it, compile and run it
# input muts contain a Space.main, but may contain more classes and methods
def run_input(input)
@string_input = input
do_setup
run_all
end