This commit is contained in:
Torsten Ruger 2015-07-19 12:33:33 +03:00
parent 1f95d8994c
commit 6da1c69b87
3 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ module Fragments
def check def check
expressions = Virtual.machine.boot.compile_main @string_input expressions = Virtual.machine.boot.compile_main @string_input
@expect.each_with_index do | should , i | @expect.each_with_index do | should , i |
assert expressions[i].is_a?(Virtual::Slot) , "compiles should return slots, not #{should.class}"
assert_equal should , expressions[i].class assert_equal should , expressions[i].class
end end
# Virtual.machine.run_passes # Virtual.machine.run_passes

View File

@ -10,7 +10,7 @@ def foo2(x)
end end
3.foo( 4 ) 3.foo( 4 )
HERE HERE
@expect = [Parfait::Method , Virtual::Return ] @expect = [ Virtual::Return ]
check check
end end

View File

@ -6,7 +6,7 @@ class TestFunctions < MiniTest::Test
def test_functions def test_functions
@string_input = <<HERE @string_input = <<HERE
def minus(a,b) def minus(a,b)
a - b a - b
end end
def plus(a, b) def plus(a, b)
a + b a + b