mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
433da1fc04
They pass fine.
19 lines
231 B
C
19 lines
231 B
C
#include <assert.h>
|
|
#include <setjmp.h>
|
|
|
|
static jmp_buf ENV;
|
|
|
|
extern void test_middle();
|
|
|
|
void test_start(void(*f)()) {
|
|
if (setjmp(ENV) != 0)
|
|
return;
|
|
f();
|
|
assert(0);
|
|
}
|
|
|
|
void test_end() {
|
|
longjmp(ENV, 1);
|
|
assert(0);
|
|
}
|