small fixes to make tests pass again

This commit is contained in:
Torsten Ruger 2015-10-07 10:04:55 +03:00
parent cc89e49a43
commit af6366f2d1
3 changed files with 9 additions and 7 deletions

View File

@ -44,6 +44,9 @@ HERE
def test_puts_string
@string_input = <<HERE
class Object
int puts(ref str)
return str
end
int main()
puts("Hello")
end

View File

@ -7,6 +7,7 @@ class TestIf < MiniTest::Test
@string_input = <<HERE
class Object
int main()
int n = 10
if( n < 12)
3
else

View File

@ -5,11 +5,7 @@ class TestRecursinveFibo < MiniTest::Test
def test_recursive_fibo
@string_input = <<HERE
class Integer
int fib_print(int n)
int fib = fibonaccir( n )
fib.putint()
end
class Object
int fibonaccir( int n )
if( n <= 1 )
return n
@ -22,8 +18,10 @@ class Integer
return a + b
end
end
int fib_print(int n)
int fib = fibonaccir( n )
fib.putint()
end
class Object
int main()
fib_print(10)
end