dyld-832.7.1.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen_preflight.dtest / main.c
1
2 // BUILD: $CC main.c -DRUN_DIR="$RUN_DIR" -o $BUILD_DIR/dlopen_preflight.exe
3
4 // RUN: ./dlopen_preflight.exe
5
6 #include <stdio.h>
7 #include <dlfcn.h>
8
9 #include "test_support.h"
10
11 int main(int argc, const char* argv[], const char* envp[], const char* apple[])
12 {
13 if ( !dlopen_preflight("/System/Library/Frameworks/Foundation.framework/Foundation") ) {
14 FAIL("Foundation.framework cannot be found");
15 }
16
17 #if TARGET_OS_OSX
18 if ( !dlopen_preflight("/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation") ) {
19 FAIL("Foundation.framework via symlink cannot be found");
20 }
21 #endif
22
23 PASS("SUCCESS");
24 }
25