diff options
author | Steven Wu <stevenwu@apple.com> | 2015-02-04 18:10:38 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2015-02-04 18:10:38 +0000 |
commit | 72c41219df1c505f9c0e521d2bca4481fab651cb (patch) | |
tree | 0f8c8231b92ba0ff913a08a56f7f99f3a914f140 /test/Driver/darwin-version.c | |
parent | edd4ba453032ba698cb5cca916eb2aa33d350c48 (diff) | |
download | clang-72c41219df1c505f9c0e521d2bca4481fab651cb.tar.gz |
Update darwin-version tests
Summary:
Now that the darwin-version tests in Driver and Frontend are
testing different parts of the version encoding instead of doing
duplicated work
Reviewers: rnk
Reviewed By: rnk
Subscribers: rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D7134
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/darwin-version.c')
-rw-r--r-- | test/Driver/darwin-version.c | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/test/Driver/darwin-version.c b/test/Driver/darwin-version.c index 2478a99dad..494c911d4d 100644 --- a/test/Driver/darwin-version.c +++ b/test/Driver/darwin-version.c @@ -1,31 +1,49 @@ -// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 \ -// RUN: %clang -target i386-apple-darwin9 -DTEST0 -E %s -#ifdef TEST0 -#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010 -#error Invalid version -#endif -#endif +// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX %s +// CHECK-VERSION-OSX: "armv6-apple-macosx10.5.0" +// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.0 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s +// CHECK-VERSION-IOS2: "armv6-apple-ios2.0.0" +// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.2 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS22 %s +// CHECK-VERSION-IOS22: "armv6-apple-ios2.2.0" +// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=3.0 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS3 %s +// CHECK-VERSION-IOS3: "armv6-apple-ios3.0.0" +// RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s +// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s +// CHECK-VERSION-OSX4: "i386-apple-macosx10.4.0" +// RUN: %clang -target i686-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s +// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.5 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s +// CHECK-VERSION-OSX5: "i386-apple-macosx10.5.0" +// RUN: %clang -target i686-apple-darwin10 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s +// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.6 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s +// CHECK-VERSION-OSX6: "i386-apple-macosx10.6.0" +// RUN: %clang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s +// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min=10.10 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s +// CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0" +// Check environment variable gets interpreted correctly +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 \ +// RUN: %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s // RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.0 \ -// RUN: %clang -target i386-apple-darwin9 -DTEST1 -E %s -#ifdef TEST1 -#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ != 20000 -#error Invalid version -#endif -#endif - -// RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \ -// RUN: %clang -target i386-apple-darwin9 -DTEST2 -E %s -#ifdef TEST2 -#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ != 20301 -#error Invalid version -#endif -#endif +// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s // RUN: env MACOSX_DEPLOYMENT_TARGET=10.4.10 \ -// RUN: %clang -target i386-apple-darwin9 -DTEST3 -E %s -#ifdef TEST3 -#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1049 -#error Invalid version -#endif -#endif +// RUN: %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX49 %s +// CHECK-VERSION-OSX49: "i386-apple-macosx10.4.10" +// RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \ +// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS231 %s +// CHECK-VERSION-IOS231: "armv6-apple-ios2.3.1" |