more fragment tests

This commit is contained in:
Torsten Ruger
2015-07-19 13:31:13 +03:00
parent 31d825df7b
commit d7c9245bb3
7 changed files with 22 additions and 48 deletions

View File

@ -7,9 +7,9 @@ class TestRecursinveFibo < MiniTest::Test
@string_input = <<HERE
def fibonaccir( n )
if( n <= 1 )
return n
return n
else
a = fibonaccir( n - 1 )
a = fibonaccir( n - 1 )
b = fibonaccir( n - 2 )
return a + b
end
@ -21,11 +21,7 @@ end
fib_print(10)
HERE
@should = [0x0,0x40,0x2d,0xe9,0x1,0x0,0x53,0xe3,0xd,0x0,0x0,0xda,0x1,0x40,0x43,0xe2,0x8,0x0,0x2d,0xe9,0x4,0x30,0xa0,0xe1,0xf8,0xff,0xff,0xeb,0x8,0x0,0xbd,0xe8,0x0,0x50,0xa0,0xe1,0x2,0x60,0x43,0xe2,0x28,0x0,0x2d,0xe9,0x6,0x30,0xa0,0xe1,0xf2,0xff,0xff,0xeb,0x28,0x0,0xbd,0xe8,0x0,0x70,0xa0,0xe1,0x7,0x0,0x85,0xe0,0x0,0x0,0x0,0xea,0x3,0x0,0xa0,0xe1,0x0,0x80,0xbd,0xe8]
@output = " 55 "
@target = [:Object , :fibonaccir]
parse
write "recursive_fibo"
@expect = [Virtual::Return ]
check
end
end