]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/text-relocs/main.c
dyld-750.6.tar.gz
[apple/dyld.git] / unit-tests / test-cases / text-relocs / main.c
index a702c2e5230a0357585efb6972c4561d8c23760e..453b17bcaeec9a98f78906acad6990a12592cf4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2005-2007 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
 
 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
 
-extern bool testBar();
+extern int getx();
+extern void setx(int a);
 
 int main(int argc, const char* argv[])
 {
-       if ( testBar() )
-               PASS("text-reloc");
-       else
+       setx(20);
+       if ( getx() != 20 )
                FAIL("text-reloc");
+       else {
+               setx(99);
+               if ( getx() == 99 )
+                       PASS("text-reloc");
+               else
+                       FAIL("text-reloc");
+       }
        return EXIT_SUCCESS;
 }