diff --git a/test/mains/test_new.rb b/test/mains/test_new.rb new file mode 100644 index 00000000..a6361af6 --- /dev/null +++ b/test/mains/test_new.rb @@ -0,0 +1,17 @@ +require_relative 'helper' + +module Mains + class TestNew < MiniTest::Test + include Risc::Ticker + + def setup + @string_input = as_main("a = 98 ; while(a>0) ; a = a - 1 ; end ; return a") + super + end + def test_chain # max 98 iterations on 300 integers + run_all + assert_equal 0 , get_return , " " + end + + end +end diff --git a/test/risc/builtin/test_int_math.rb b/test/risc/builtin/test_int_math.rb index 30ab9137..fe9fd893 100644 --- a/test/risc/builtin/test_int_math.rb +++ b/test/risc/builtin/test_int_math.rb @@ -14,7 +14,7 @@ module Risc end def test_minus_neg run_main_return "5 - 15" - assert_equal -10 , get_return + assert_equal( -10 , get_return) end def test_rshift run_main_return "#{2**8} >> 3"