Commit d943e311 authored by Chrisliebär's avatar Chrisliebär
Browse files

Remove broken Ackerman.inf.java test

This test is actually wrong
* It can terminate (thous is not an infinte loop)
* It will crash with properly optimized code due to a huge call stack

This test assumes that the generated code is too slow to run into stack size problems before it runs into timeout problems
parent 24c54c37
Pipeline #182041 failed with stage
in 20 minutes and 50 seconds
class Ackermann
{
public int ack(int m, int n)
{
if (m == 0)
{
return n + 1;
}
else if((m > 0) && (n == 0))
{
return ack(m - 1, 1);
}
else if((m > 0) && (n > 0))
{
return ack(m - 1, ack(m, n - 1));
}else {
System.out.println(m);
return n + 1;
}
}
public static void main(String[] args)
{
Ackermann a = new Ackermann();
System.out.println(a.ack(2,1));
System.out.println(a.ack(2,2));
System.out.println(a.ack(3,3));
System.out.println(a.ack(3,8));
System.out.println(a.ack(4,4));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment