Home | History | Annotate | Download | only in TestUtils
      1 #!/usr/bin/env python
      2 
      3 def pcall(f, N):
      4     if N == 0:
      5         print >>f, '    f(0)'
      6         return
      7 
      8     print >>f, '    f('
      9     pcall(f, N - 1)
     10     print >>f, '     )'
     11 
     12 def main():
     13     f = open('t.c','w')
     14     print >>f, 'int f(int n) { return n; }'
     15     print >>f, 'int t() {'
     16     print >>f, '  return'
     17     pcall(f, 10000)
     18     print >>f, '  ;'
     19     print >>f, '}'
     20 
     21 if __name__ == "__main__":
     22     import sys
     23     sys.setrecursionlimit(100000)
     24     main()
     25