]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-intertwined.dtest/base.c
dyld-519.2.2.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-intertwined.dtest / base.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 static const char* expectedStrings[] = {
6 "a() from main",
7 "initC",
8 "c() from initB",
9 "c() from initD",
10 "a() from initE",
11 "d() from initF",
12 "DONE"
13 };
14
15 static const char** curState = expectedStrings;
16
17 void setState(const char* from)
18 {
19 printf("%s\n", from);
20 if ( strcmp(*curState, from) != 0 ) {
21 printf("[FAIL] dlopen-intertwined: expected %s\n", *curState);
22 exit(0);
23 }
24 ++curState;
25 }
26