]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dyld_get_sdk_version.dtest/main.c
c5032a0e9f75b6c491ccf5b295f8feefc4f23a9d
2 // BUILD: $CC main.c -o $BUILD_DIR/sdk-check.exe
4 // RUN: ./sdk-check.exe
8 #include <mach-o/dyld_priv.h>
10 extern struct mach_header __dso_handle
;
14 printf("[BEGIN] dyld_get_sdk_version\n");
17 if ( dyld_get_sdk_version(&__dso_handle
) == 0 ) {
18 printf("[FAIL] dyld_get_sdk_version: expected SDK\n");
23 const char* text
= "bad text";
24 if ( dyld_get_sdk_version((struct mach_header
*)text
) != 0 ) {
25 printf("[FAIL] dyld_get_sdk_version: expected failure\n");
31 uint32_t iosVersion
= dyld_get_program_sdk_version();
32 uint32_t watchOSVersion
= dyld_get_program_sdk_watch_os_version();
33 if (iosVersion
!= (watchOSVersion
+ 0x00070000)) {
34 printf("[FAIL] dyld_get_program_sdk_watch_os_version\n");
39 uint32_t iosVersion
= dyld_get_program_sdk_version();
40 uint32_t bridgeOSVersion
= dyld_get_program_sdk_bridge_os_version();
41 if (bridgeOSVersion
!= (watchOSVersion
+ 0x00090000)) {
42 printf("[FAIL] dyld_get_program_sdk_watch_os_version\n");
46 printf("[PASS] dyld_get_sdk_version\n");