rubyx/test/compiler/expressions/test_function.rb

28 lines
499 B
Ruby
Raw Normal View History

2015-10-14 14:17:33 +02:00
require_relative "compiler_helper"
module Virtual
class TestFunctions < MiniTest::Test
include CompilerHelper
def setup
Virtual.machine.boot
end
#reset the compiler (other than other tests that need to fake their inside a method)
def set_main compiler
compiler.set_main(nil)
end
def test_puts
@root = :function_definition
@string_input = <<HERE
int puts(Word str)
2015-10-14 14:17:33 +02:00
main()
end
HERE
@output = AST::Node
check
end
end
end