diff --git a/test/compiler/fragments/test_all.rb b/test/compiler/fragments/test_all.rb index ba2ccb20..ff94a47e 100644 --- a/test/compiler/fragments/test_all.rb +++ b/test/compiler/fragments/test_all.rb @@ -7,4 +7,4 @@ require_relative "test_if" require_relative "test_putint" require_relative "test_recursive_fibo" require_relative "test_return" -#require_relative "test_while_fibo" +require_relative "test_while_fibo" diff --git a/test/compiler/fragments/test_while_fibo.rb b/test/compiler/fragments/test_while_fibo.rb index d4cdad80..ca4778c5 100644 --- a/test/compiler/fragments/test_while_fibo.rb +++ b/test/compiler/fragments/test_while_fibo.rb @@ -9,6 +9,7 @@ class Object int fibonaccit(int n) int a = 0 int b = 1 + n = n - 1 while_plus( n ) int tmp = a a = b @@ -20,12 +21,14 @@ class Object end int main() - fibonaccit( 10 ) + return fibonaccit( 10 ) end end HERE - @length = 5 + @length = 278 check + assert_equal Parfait::Message , @interpreter.get_register(:r1).class + assert_equal 55 , @interpreter.get_register(:r1).return_value end end