]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/static-terminators.dtest/base.c
4 #include "test_support.h"
6 static bool mainCalled
= false;
7 static bool libCalled
= false;
8 static bool libCalledBeforeMain
= false;
15 void libDynamicTerminated()
19 libCalledBeforeMain
= true;
23 static __attribute__((destructor
))
27 FAIL("main's terminator not called");
28 else if ( !libCalled
)
29 FAIL("libDynamic's terminator not called");
30 else if ( !libCalledBeforeMain
)
31 FAIL("libDynamic's terminator called out of order");