small fixes to make tests pass again
This commit is contained in:
parent
cc89e49a43
commit
af6366f2d1
@ -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
|
||||
|
@ -7,6 +7,7 @@ class TestIf < MiniTest::Test
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
int main()
|
||||
int n = 10
|
||||
if( n < 12)
|
||||
3
|
||||
else
|
||||
|
@ -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
|
||||
end
|
||||
class Object
|
||||
int fib_print(int n)
|
||||
int fib = fibonaccir( n )
|
||||
fib.putint()
|
||||
end
|
||||
int main()
|
||||
fib_print(10)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user