2018-04-24 18:57:14 +02:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Risc
|
|
|
|
class InterpreterWhileCmp < MiniTest::Test
|
|
|
|
include Ticker
|
|
|
|
|
|
|
|
def setup
|
|
|
|
@string_input = as_main 'a = 0; while( 0 >= a); a = 1 + a;end;return a'
|
|
|
|
super
|
|
|
|
end
|
|
|
|
|
2018-08-06 13:07:17 +02:00
|
|
|
def test_while
|
|
|
|
run_all
|
|
|
|
assert_equal 1 , get_return
|
2018-04-24 18:57:14 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|