[cfe-commits] r68817 - /cfe/trunk/test/Frontend/darwin-version.c

Daniel Dunbar daniel at zuster.org
Fri Apr 10 13:13:52 PDT 2009


Author: ddunbar
Date: Fri Apr 10 15:13:51 2009
New Revision: 68817

URL: http://llvm.org/viewvc/llvm-project?rev=68817&view=rev
Log:
Test case for -miphoneos-version-min, also part of Shantonu's patch!

Added:
    cfe/trunk/test/Frontend/darwin-version.c

Added: cfe/trunk/test/Frontend/darwin-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/darwin-version.c?rev=68817&view=auto

==============================================================================
--- cfe/trunk/test/Frontend/darwin-version.c (added)
+++ cfe/trunk/test/Frontend/darwin-version.c Fri Apr 10 15:13:51 2009
@@ -0,0 +1,23 @@
+// RUN: clang-cc -triple armv6-apple-darwin9 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '10000' | count 1 &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 &&
+// RUN: clang-cc -triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1 &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 &&
+// RUN: clang-cc -triple armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin8 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin9 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin10 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 &&
+// RUN: clang-cc -triple i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t - < /dev/null &&
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 &&
+// RUN: true





More information about the cfe-commits mailing list