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