add some multi method tests

This commit is contained in:
Torsten Ruger
2018-04-26 12:33:33 +03:00
parent a8e7602193
commit 26fe77ed68
5 changed files with 93 additions and 1 deletions

View File

@ -79,12 +79,19 @@ module Risc
classes
end
# do the setup, compile and run the input to the end
# do the setup, compile and run the input (a main) to the end
def run_main(input)
@string_input = as_main(input)
do_setup
run_all
end
# wrap the input in Space (main is assumed to be part of it)
def run_space(input)
@string_input = in_Space(input)
do_setup
run_all
end
def run_all
@interpreter.tick while(@interpreter.instruction)
end