just checking fibo 30
at just under 8000 instructions i can't wait to run real benchmarks
This commit is contained in:
parent
393ac873c9
commit
554c2d3d73
@ -16,7 +16,8 @@ module Mains
|
|||||||
tests << method_name
|
tests << method_name
|
||||||
input = File.read(file_name)
|
input = File.read(file_name)
|
||||||
self.send(:define_method, method_name ) do
|
self.send(:define_method, method_name ) do
|
||||||
run_main(input)
|
ticks = run_main(input)
|
||||||
|
#puts "Ticks for #{method_name}=#{ticks}"
|
||||||
assert_equal stdout , @interpreter.stdout , "Wrong stdout #{name}"
|
assert_equal stdout , @interpreter.stdout , "Wrong stdout #{name}"
|
||||||
assert_equal exit_code , get_return.to_s , "Wrong exit code #{name}"
|
assert_equal exit_code , get_return.to_s , "Wrong exit code #{name}"
|
||||||
end
|
end
|
||||||
|
@ -106,6 +106,7 @@ module Risc
|
|||||||
end
|
end
|
||||||
def run_all
|
def run_all
|
||||||
@interpreter.tick while(@interpreter.instruction)
|
@interpreter.tick while(@interpreter.instruction)
|
||||||
|
@interpreter.clock
|
||||||
end
|
end
|
||||||
|
|
||||||
# for chaning the tests quickly output all instructions that are executed
|
# for chaning the tests quickly output all instructions that are executed
|
||||||
|
Loading…
Reference in New Issue
Block a user