2015-09-27 10:28:06 +02:00
|
|
|
require_relative "compiler_helper"
|
|
|
|
require_relative "code_checker"
|
|
|
|
|
|
|
|
module Virtual
|
|
|
|
class TestFoo < MiniTest::Test
|
|
|
|
include CodeChecker
|
|
|
|
|
2015-09-27 15:06:48 +02:00
|
|
|
def test_foo3
|
2015-09-27 10:28:06 +02:00
|
|
|
@string_input = <<HERE
|
2015-10-05 23:27:13 +02:00
|
|
|
class Object
|
|
|
|
field int a
|
|
|
|
int foo(int x)
|
|
|
|
int b = self.a
|
|
|
|
return b +x
|
|
|
|
end
|
2015-09-27 10:28:06 +02:00
|
|
|
end
|
|
|
|
HERE
|
2015-09-27 11:59:50 +02:00
|
|
|
@output = [ [Virtual::MethodEnter] , [Virtual::MethodReturn] ]
|
2015-09-27 10:28:06 +02:00
|
|
|
check
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|