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