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
|
|
|
|
@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
|