Files
swift-mirror/test/BuildConfigurations/basicIdentity.swift
David Farler 2a0f027317 Review changes for _compiler_version
A couple of small tweaks to _compiler_version based on review comments:
- Fix &&/|| rejection to work with _compiler_version on either side of the
expression. Also add some test cases around this.
- Use clang/LLVM facilities for isdigit and atoi.
- Assert if parsing an invalid version string and there is no diagnostic
engine.
- Clean up some crumbs in the CMake configs.

rdar://problem/22730282

Swift SVN r32212
2015-09-24 22:47:01 +00:00

66 lines
927 B
Swift

// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 -parse-stdlib
struct Foo {}
#if FOO
var a = Foo()
#endif
var b = a
#if !BAR
var c = Foo()
#endif
var d = c
#if FOO || BAR
var e = Foo()
#endif
var f = e
#if BAR || FOO
var g = Foo()
#endif
var h = g
#if FOO && BAZ
var i = Foo()
#endif
var j = i
#if os(OSX)
var k = Foo()
#endif
var l = k
#if arch(x86_64)
var m = Foo()
#endif
var n = m
#if FOO && !BAR && BAZ && os(OSX) && arch(x86_64) && _runtime(_ObjC)
var o = Foo()
#endif
var p = o
#if FOO && (!BAR && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC)
var q = Foo()
#endif
var r = q
#if FOO && !(!BAZ && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC)
var s = Foo()
#endif
var t = s
// Test symmetric version of FOO || BAR from above
#if BAR || FOO
var u = Foo()
#endif
var v = u
// Test symmetric version of FOO && BAR from above
#if BAZ && FOO
var w = Foo()
#endif
var x = w