start a new ruby layer to do the to_vool conversion
the "normalization" is getting more and more complicated and is not tested And it seems i really don't like working with the untyped ast
This commit is contained in:
17
test/ruby/helper.rb
Normal file
17
test/ruby/helper.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module Ruby
|
||||
module RubyTests
|
||||
def setup
|
||||
Parfait.boot!
|
||||
end
|
||||
def compile(input)
|
||||
RubyCompiler.compile(input)
|
||||
end
|
||||
|
||||
def ruby_to_vool(input)
|
||||
RubyXCompiler.new(input).ruby_to_vool
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestArrayX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestBasicValuesX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestBlockStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestEmptyClassStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class HashArrayX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative 'helper'
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestIfStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestIvarAssignmentX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestLocalAssignmentX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestLogicalX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestMethodStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
module OpAss
|
||||
def test_local_name
|
||||
assert_equal :foo , @lst.name
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestReturnStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestSendX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestVariablesX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative 'helper'
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestWhileStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Vool
|
||||
module Ruby
|
||||
class TestYieldStatementX < MiniTest::Test
|
||||
include RubyTests
|
||||
|
@ -1,9 +0,0 @@
|
||||
require_relative "../../helper"
|
||||
|
||||
module Vool
|
||||
module RubyTests
|
||||
def compile(input)
|
||||
RubyX::RubyCompiler.compile(input)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user