2018-08-08 11:03:17 +02:00
|
|
|
require_relative 'helper'
|
|
|
|
|
|
|
|
module Mains
|
|
|
|
class TestNew < MiniTest::Test
|
|
|
|
include Risc::Ticker
|
|
|
|
|
|
|
|
def setup
|
2019-02-09 11:44:35 +01:00
|
|
|
@string_input = as_main("a = 37 ; while(a>0) ; a = a - 1 ; end ; return a")
|
2018-08-08 11:03:17 +02:00
|
|
|
super
|
|
|
|
end
|
2018-11-14 11:41:13 +01:00
|
|
|
def test_chain # max 1011 iterations on 1014 integers (1024 - 10 reserve)
|
2018-08-08 11:03:17 +02:00
|
|
|
run_all
|
2019-02-07 17:24:35 +01:00
|
|
|
assert_equal ::Integer , get_return.class , " "
|
2018-08-08 11:03:17 +02:00
|
|
|
assert_equal 0 , get_return , " "
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|