2018-04-23 13:16:46 +03:00
|
|
|
require_relative "../helper"
|
2018-04-20 13:13:09 +03:00
|
|
|
|
|
|
|
module Risc
|
|
|
|
class InterpreterAssignTwice < MiniTest::Test
|
|
|
|
include Ticker
|
|
|
|
|
|
|
|
def setup
|
2019-09-13 14:07:12 +03:00
|
|
|
@preload = "Integer.plus"
|
2018-04-20 13:13:09 +03:00
|
|
|
@string_input = as_main("a = 5 ;a = 5 + a ; return a")
|
|
|
|
super
|
|
|
|
end
|
|
|
|
|
2018-08-06 14:07:17 +03:00
|
|
|
def test_ret
|
|
|
|
run_all
|
2018-06-19 18:55:47 +03:00
|
|
|
assert_equal 10 , get_return
|
2018-04-20 13:13:09 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|