]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/upward-dylib-init-order/common.c
dyld-360.22.tar.gz
[apple/dyld.git] / unit-tests / test-cases / upward-dylib-init-order / common.c
index c7038356e49db97ec25e096d799cfe441cc68f65..663e4a19b4a2a0e7e81070f2fb08b94f53ce9f42 100644 (file)
@@ -3,27 +3,35 @@
 
 static bool b = false;
 static bool u = false;
+static bool u2 = false;
 static bool isOk = true;
 
 void setB()
 {
-       if ( u || b )
+       if ( u || b || u2 )
                isOk = false;
        b = true;
 }
 
 void setU()
 {
-       if ( u )
+       if ( u  || u2 )
                isOk = false;
        u = true;
 }
 
+void setU2()
+{
+       if ( u2 )
+               isOk = false;
+       u2 = true;
+}
+
 // return true iff
 // setB() was called, then setU()
 bool ok()
 {
        //fprintf(stderr, "isOk=%d, u=%d, b=%d\n", isOk, u, b);
-       return isOk && u && b;
+       return isOk && u && b && u2;
 }