rubyx/test/risc/interpreter/while/test_while_count.rb

20 lines
372 B
Ruby
Raw Normal View History

2018-04-23 12:16:46 +02:00
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