blob: e7bc41117e3fcee00f81da8315eb7a26e3c2acef [file] [log] [blame]
Steven Wua74bbaf2015-02-04 18:10:38 +00001// RUN: %clang_cc1 -triple armv6-apple-ios3.0.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +00002// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1
Rafael Espindolabe8a91b2013-07-04 15:22:16 +00003// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
Steven Wua74bbaf2015-02-04 18:10:38 +00004// RUN: %clang_cc1 -triple armv6-apple-ios2.0.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +00005// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1
Rafael Espindolabe8a91b2013-07-04 15:22:16 +00006// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
Steven Wua74bbaf2015-02-04 18:10:38 +00007// RUN: %clang_cc1 -triple armv6-apple-ios2.2.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +00008// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1
Steven Wua74bbaf2015-02-04 18:10:38 +00009// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
10// RUN: %clang_cc1 -triple armv6-apple-ios2.3.1 -dM -E -o %t %s
11// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20301' | count 1
12// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
13// RUN: %clang_cc1 -triple i386-apple-macosx10.4.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +000014// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1
Rafael Espindolabe8a91b2013-07-04 15:22:16 +000015// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
Tim Northover67465f82015-10-30 16:30:30 +000016// RUN: not grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t
17// RUN: not grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t
Steven Wua74bbaf2015-02-04 18:10:38 +000018// RUN: %clang_cc1 -triple i386-apple-macosx10.4.10 -dM -E -o %t %s
19// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1049' | count 1
20// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
21// RUN: %clang_cc1 -triple i386-apple-macosx10.5.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +000022// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
Steven Wua74bbaf2015-02-04 18:10:38 +000023// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
24// RUN: %clang_cc1 -triple i386-apple-macosx10.6.0 -dM -E -o %t %s
Daniel Dunbar8b576972009-11-08 01:45:36 +000025// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1
Steven Wua74bbaf2015-02-04 18:10:38 +000026// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
27// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 -dM -E -o %t %s
Bob Wilson2a3710e2014-08-08 21:45:53 +000028// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '101000' | count 1
Steven Wua74bbaf2015-02-04 18:10:38 +000029// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
Tim Northover67465f82015-10-30 16:30:30 +000030
31// RUN: %clang_cc1 -triple arm64-apple-tvos8.3 -dM -E -o %t %s
32// RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
33// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
34// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
35
36// RUN: %clang_cc1 -triple x86_64-apple-tvos8.3 -dM -E -o %t %s
37// RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
38// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
39// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
40
41// RUN: %clang_cc1 -triple armv7k-apple-watchos2.1 -dM -E -o %t %s
42// RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
43// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
44// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
45
46// RUN: %clang_cc1 -triple i386-apple-watchos2.1 -dM -E -o %t %s
47// RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
48// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
49// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t