rubyx/test/compiler/expressions/test_function.rb
Torsten Ruger 2094101bb2 clearer organization for compiler tests
was slightly messy with small/large
now needed different test for expression and statements
2015-10-14 21:49:05 +03:00

28 lines
499 B
Ruby

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)
main()
end
HERE
@output = AST::Node
check
end
end
end