def test_setjmp_many(self):
    src = '\n      #include <stdio.h>\n      #include <setjmp.h>\n\n      int main(int argc, char** argv) {\n        jmp_buf buf;\n        for (int i = 0; i < NUM; i++) printf("%d\\n", setjmp(buf));\n        if (argc-- == 1131) longjmp(buf, 11);\n        return 0;\n      }\n    '
    for num in [1, 5, 20, 1000]:
        print(('NUM=%d' % num))
        self.do_run(src.replace('NUM', str(num)), ('0\n' * num))
def test_setjmp_many(self):
    src = '\n      #include <stdio.h>\n      #include <setjmp.h>\n\n      int main(int argc, char** argv) {\n        jmp_buf buf;\n        for (int i = 0; i < NUM; i++) printf("%d\\n", setjmp(buf));\n        if (argc-- == 1131) longjmp(buf, 11);\n        return 0;\n      }\n    '
    for num in [1, 5, 20, 1000]:
        print(('NUM=%d' % num))
        self.do_run(src.replace('NUM', str(num)), ('0\n' * num))