test other int methods

harness for testing compiler in a method (before just in a case)
This commit is contained in:
Torsten Ruger
2018-04-19 19:59:48 +03:00
parent a98d7630fb
commit 7d9132ee36
4 changed files with 42 additions and 22 deletions

View File

@ -14,6 +14,7 @@ module Risc
@interpreter = Interpreter.new
@interpreter.start Risc.machine.risc_init
end
alias :do_setup :setup
# must be after boot, but before main compile, to define method
def do_clean_compile
@ -77,7 +78,13 @@ module Risc
end
classes
end
alias :run_all :all_classes
# do the setup, compile and run the input to the end
def run_all(input)
@string_input = as_main(input)
do_setup
all_classes
end
# for chaning the tests quickly output all instructions that are executed
def show_ticks
classes = all_classes