20 lines
349 B
C
20 lines
349 B
C
|
#include <ft/test.h>
|
||
|
#include <ft/all-tests.h>
|
||
|
#include <setjmp.h>
|
||
|
|
||
|
static void _ft_setjmp_massive(ft_test *t)
|
||
|
{
|
||
|
jmp_buf jb;
|
||
|
|
||
|
int rc = setjmp(jb);
|
||
|
while(rc < 1000) longjmp(jb, rc + 1);
|
||
|
|
||
|
/* Does it finish, is the question */
|
||
|
ft_assert(t, true);
|
||
|
}
|
||
|
|
||
|
ft_test ft_setjmp_massive = {
|
||
|
.name = "Massive long jumps",
|
||
|
.function = _ft_setjmp_massive,
|
||
|
};
|