Torsten Rüger
12b29285d7
so many relied (implicitly( on some builtin function after all can't do much in ruby without calling Now all those dependencies are explicit Small risc changes come because the macro version has a return label and unreachable label
20 lines
372 B
Ruby
20 lines
372 B
Ruby
require_relative "../helper"
|
|
|
|
module Risc
|
|
class InterpreterWhileCount < MiniTest::Test
|
|
include Ticker
|
|
include Preloader
|
|
|
|
def setup
|
|
@preload = "Integer.gt;Integer.plus"
|
|
@string_input = as_main 'a = -1; while( 0 > a); a = 1 + a;end;return a'
|
|
super
|
|
end
|
|
|
|
def test_while
|
|
run_all
|
|
assert_equal 0 , get_return
|
|
end
|
|
end
|
|
end
|