The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_crasher_tco.sol 311B

12345678910111213
  1. execfile("tests/_lib.sol")
  2. func blow_up_stack(n)
  3. return if n > 0 then
  4. 1 + blow_up_stack(n - 1)
  5. else
  6. 0
  7. end
  8. end
  9. assert_eq(blow_up_stack(5), 5, "blow_up_stack 5 deep")
  10. assert_eq(blow_up_stack(5000), 5000, "blow_up_stack 5000 deep")
  11. assert_eq(blow_up_stack(5000000), 5000000, "blow_up_stack 5000000 deep")