Torsten Rüger
12b29285d7
so many relied (implicitly( on some builtin function after all can't do much in ruby without calling Now all those dependencies are explicit Small risc changes come because the macro version has a return label and unreachable label
28 lines
603 B
Ruby
28 lines
603 B
Ruby
require_relative "../helper"
|
|
|
|
module Risc
|
|
class BlockCallSimpleWithArg < MiniTest::Test
|
|
include Ticker
|
|
def setup
|
|
@string_input = block_main("a = tenner {|b| return b} ; return a" , tenner)
|
|
super
|
|
end
|
|
def test_chain
|
|
run_all
|
|
assert_equal 10 , get_return
|
|
end
|
|
end
|
|
class BlockCallArgOp < MiniTest::Test
|
|
include Ticker
|
|
def setup
|
|
@preload = "Integer.mul"
|
|
@string_input = block_main("a = tenner {|b| return 2 * b} ; return a" , tenner)
|
|
super
|
|
end
|
|
def test_chain
|
|
run_all
|
|
assert_equal 20 , get_return
|
|
end
|
|
end
|
|
end
|