start on vool, the virtual oo language
start with syntax tree, not linked into existing code until finished
This commit is contained in:
1
test/vool/helper.rb
Normal file
1
test/vool/helper.rb
Normal file
@ -0,0 +1 @@
|
||||
require_relative "../helper"
|
24
test/vool/test_class_statement.rb
Normal file
24
test/vool/test_class_statement.rb
Normal file
@ -0,0 +1,24 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module Vool
|
||||
class TestClassStatement < MiniTest::Test
|
||||
|
||||
def setup
|
||||
input = "class Tryout < Base;end"
|
||||
@lst = Compiler.compile( input )
|
||||
end
|
||||
|
||||
def test_compile_class
|
||||
assert_equal ClassStatement , @lst.class
|
||||
end
|
||||
|
||||
def test_compile_class_name
|
||||
assert_equal :Tryout , @lst.name
|
||||
end
|
||||
|
||||
def test_compile_class_super
|
||||
assert_equal :Base , @lst.super_class_name
|
||||
end
|
||||
|
||||
end
|
||||
end
|
2
test/vool/test_compiler.rb
Normal file
2
test/vool/test_compiler.rb
Normal file
@ -0,0 +1,2 @@
|
||||
require_relative "helper"
|
||||
require_relative "test_class_statement"
|
Reference in New Issue
Block a user