2014-05-21 22:16:19 +03:00
|
|
|
require_relative 'helper'
|
|
|
|
|
|
|
|
class TestPutint < MiniTest::Test
|
|
|
|
include Fragments
|
|
|
|
|
2015-09-20 16:52:26 +03:00
|
|
|
def test_putint
|
2014-05-21 22:16:19 +03:00
|
|
|
@string_input = <<HERE
|
2015-10-14 15:08:42 +03:00
|
|
|
class Integer
|
|
|
|
int putint()
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
end
|
2015-10-06 00:27:13 +03:00
|
|
|
class Object
|
|
|
|
int main()
|
|
|
|
42.putint()
|
|
|
|
end
|
|
|
|
end
|
2014-05-21 22:16:19 +03:00
|
|
|
HERE
|
2015-10-18 17:39:35 +03:00
|
|
|
@expect = [ [SaveReturn,Virtual::Set,Register::GetSlot,Virtual::Set,
|
2015-10-18 19:27:46 +03:00
|
|
|
Virtual::Set,RegisterTransfer,FunctionCall] ,[RegisterTransfer,GetSlot,FunctionReturn] ]
|
2015-09-20 16:52:26 +03:00
|
|
|
check
|
2014-05-21 22:16:19 +03:00
|
|
|
end
|
|
|
|
end
|