rubyx/test/risc/interpreter/while/test_while_cmp.rb
Torsten Rüger 12b29285d7 Lots of preloading for tests
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
2019-09-13 14:07:12 +03:00

19 lines
348 B
Ruby

require_relative "../helper"
module Risc
class InterpreterWhileCmp < MiniTest::Test
include Ticker
def setup
@preload = "Integer.ge;Integer.plus"
@string_input = as_main 'a = 0; while( 0 >= a); a = 1 + a;end;return a'
super
end
def test_while
run_all
assert_equal 1 , get_return
end
end
end