moving vool_method to parfait

This commit is contained in:
Torsten Ruger
2017-12-10 20:47:26 +02:00
parent b7701d0d5e
commit bc5906fb83
10 changed files with 55 additions and 28 deletions

View File

@ -0,0 +1,26 @@
#require_relative 'helper'
module Rubyx
class TestRubyAdds < MiniTest::Test
# include RubyxTests
def pest_ruby_adds
@string_input = <<HERE
def fibo( n)
a = 0
b = 1
i = 1
while( i < n ) do
result = a + b
a = b
b = result
i+= 1
end
return result
end
HERE
@stdout = "Hello there"
check
end
end
end

View File

@ -25,7 +25,7 @@ module MomCompile
lst = Vool::VoolCompiler.compile as_test_main( input )
assert_equal Parfait::Class , lst.clazz.class , input
@method = lst.clazz.get_method(:main)
assert @method
assert_equal Parfait::VoolMethod , @method.class
res = lst.to_mom( nil )
#puts "#{res.class}"
res.first
@ -40,7 +40,7 @@ module MomCompile
test = is
while(test)
# if we assert here, we get output pointing here. Without stack, not useful
raise "Wrong class for #{index+1}, #{dump(is)}" if should[index] != test.class
raise "Wrong class for #{index+1}, #{dump(is)}" if should[index] != test.class
index += 1
test = test.next
end

View File

@ -33,7 +33,7 @@ module Vool
def test_creates_method_in_class
method = create_method
assert method , "No method created"
assert_equal Vool::VoolMethod , method.class
assert_equal Parfait::VoolMethod , method.class
end