new field access code and test. wip as field def broken
This commit is contained in:
22
test/compiler/test_field_access.rb
Normal file
22
test/compiler/test_field_access.rb
Normal file
@ -0,0 +1,22 @@
|
||||
require_relative "compiler_helper"
|
||||
require_relative "code_checker"
|
||||
|
||||
module Virtual
|
||||
class TestFoo < MiniTest::Test
|
||||
include CodeChecker
|
||||
|
||||
def test_foo2
|
||||
@string_input = <<HERE
|
||||
int a
|
||||
int foo(int x)
|
||||
int b = self.a
|
||||
return b +x
|
||||
end
|
||||
HERE
|
||||
@expect = [ Virtual::Return ]
|
||||
check
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user