]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/static-terminators.dtest/base.c
5 static bool mainCalled
= false;
6 static bool libCalled
= false;
7 static bool libCalledBeforeMain
= false;
14 void libDynamicTerminated()
18 libCalledBeforeMain
= true;
22 static __attribute__((destructor
))
26 printf("[FAIL] static-terminators, main's terminator not called\n");
27 else if ( !libCalled
)
28 printf("[FAIL] static-terminators, libDynamic's terminator not called\n");
29 else if ( !libCalledBeforeMain
)
30 printf("[FAIL] static-terminators, libDynamic's terminator called out of order\n");
32 printf("[PASS] static-terminators\n");