2018-04-23 19:39:16 +03:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Risc
|
2018-04-24 19:46:22 +03:00
|
|
|
class InterpreterIfSmaller < MiniTest::Test
|
2018-04-23 19:39:16 +03:00
|
|
|
include Ticker
|
|
|
|
|
|
|
|
def setup
|
2019-09-13 14:07:12 +03:00
|
|
|
@preload = "Integer.lt"
|
2018-06-19 18:55:47 +03:00
|
|
|
@string_input = as_main 'if( 5 < 5 ); return 1;else;return 2;end'
|
2018-04-23 19:39:16 +03:00
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_if
|
2018-08-06 14:07:17 +03:00
|
|
|
run_all
|
2018-06-19 18:55:47 +03:00
|
|
|
assert_equal 2 , get_return
|
2018-04-23 19:39:16 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|