]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/weak-coalesce.dtest/base.c
4 #include "test_support.h"
7 static bool wasProblem
= false;
8 static const char* coal1Where
= NULL
;
9 static int* coal1Addr
= NULL
;
10 static int checkInCountCoal1
= 0;
12 void baseVerifyCoal1(const char* where
, int* addr
)
14 LOG("baseVerifyCoal1(%s, %p)", where
, addr
);
16 if ( coal1Where
== NULL
) {
21 if ( addr
!= coal1Addr
) {
22 LOG("coal1 resolved to different locations. %p in %s and %p in %s",
23 coal1Addr
, coal1Where
, addr
, where
);
30 static const char* coal2Where
= NULL
;
31 static int* coal2Addr
= NULL
;
32 static int checkInCountCoal2
= 0;
34 void baseVerifyCoal2(const char* where
, int* addr
)
36 LOG("baseVerifyCoal2(%s, %p)", where
, addr
);
38 if ( coal2Where
== NULL
) {
43 if ( addr
!= coal2Addr
) {
44 LOG("coal2 resolved to different locations. %p in %s and %p in %s",
45 coal2Addr
, coal2Where
, addr
, where
);
57 else if ( checkInCountCoal1
!= 4 )
58 FAIL("checkInCountCoal1 != 4");
59 else if ( checkInCountCoal2
!= 4 )
60 FAIL("checkInCountCoal2 != 2");