adds method_statement to vool
This commit is contained in:
@ -20,5 +20,9 @@ module Vool
|
||||
assert_equal :Base , @lst.super_class_name
|
||||
end
|
||||
|
||||
def test_compile_class_body
|
||||
assert_equal [] , @lst.body
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -1,2 +1,3 @@
|
||||
require_relative "helper"
|
||||
require_relative "test_class_statement"
|
||||
require_relative "test_method_statement"
|
||||
|
28
test/vool/test_method_statement.rb
Normal file
28
test/vool/test_method_statement.rb
Normal file
@ -0,0 +1,28 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module Vool
|
||||
class TestMethodStatement < MiniTest::Test
|
||||
|
||||
def setup
|
||||
input = "def tryout(arg1, arg2) ; end "
|
||||
@lst = Compiler.compile( input )
|
||||
end
|
||||
|
||||
def test_compile_method
|
||||
assert_equal MethodStatement , @lst.class
|
||||
end
|
||||
|
||||
def test_compile_method_name
|
||||
assert_equal :tryout , @lst.name
|
||||
end
|
||||
|
||||
def test_compile_method_super
|
||||
assert_equal [:arg1, :arg2] , @lst.args
|
||||
end
|
||||
|
||||
def test_compile_method_body
|
||||
assert_equal [] , @lst.body
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user