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
|
def test_puts_string
|
||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
class Object
|
class Object
|
||||||
|
int puts(ref str)
|
||||||
|
return str
|
||||||
|
end
|
||||||
int main()
|
int main()
|
||||||
puts("Hello")
|
puts("Hello")
|
||||||
end
|
end
|
||||||
|
@ -7,6 +7,7 @@ class TestIf < MiniTest::Test
|
|||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
class Object
|
class Object
|
||||||
int main()
|
int main()
|
||||||
|
int n = 10
|
||||||
if( n < 12)
|
if( n < 12)
|
||||||
3
|
3
|
||||||
else
|
else
|
||||||
|
@ -5,11 +5,7 @@ class TestRecursinveFibo < MiniTest::Test
|
|||||||
|
|
||||||
def test_recursive_fibo
|
def test_recursive_fibo
|
||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
class Integer
|
class Object
|
||||||
int fib_print(int n)
|
|
||||||
int fib = fibonaccir( n )
|
|
||||||
fib.putint()
|
|
||||||
end
|
|
||||||
int fibonaccir( int n )
|
int fibonaccir( int n )
|
||||||
if( n <= 1 )
|
if( n <= 1 )
|
||||||
return n
|
return n
|
||||||
@ -22,8 +18,10 @@ class Integer
|
|||||||
return a + b
|
return a + b
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
int fib_print(int n)
|
||||||
class Object
|
int fib = fibonaccir( n )
|
||||||
|
fib.putint()
|
||||||
|
end
|
||||||
int main()
|
int main()
|
||||||
fib_print(10)
|
fib_print(10)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user