new test to run out of ints
This commit is contained in:
parent
6200a35562
commit
f5ea51c4d0
17
test/mains/test_new.rb
Normal file
17
test/mains/test_new.rb
Normal file
@ -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
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user