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