rubyx/test/compiler/fragments/test_foo.rb

26 lines
425 B
Ruby
Raw Normal View History

2014-05-21 20:37:04 +02:00
require_relative 'helper'
class TestFoo < MiniTest::Test
include Fragments
def test_foo2
2014-05-21 20:37:04 +02:00
@string_input = <<HERE
class Object
int foo(int x)
int a = 5
return a
end
int main()
foo( 4 )
end
end
2014-05-21 20:37:04 +02:00
HERE
2015-10-10 11:04:34 +02:00
@expect = [ [Virtual::MethodEnter,Register::GetSlot,Virtual::Set,Virtual::Set,
2015-10-09 20:53:22 +02:00
Virtual::Set,Virtual::Set,Virtual::MethodCall] ,[Virtual::MethodReturn] ]
check
2014-05-21 20:37:04 +02:00
end
end