Skip to content

Commit 6f91a4e

Browse files
[stdlib] Migrate remaining stdlib tests from Swift 3 (#18740)
* Migrate remaining stdlib tests from Swift 3 * Fix misprunt * Remove seemingly pointless loops
1 parent 8b561ad commit 6f91a4e

11 files changed

+322
-373
lines changed

test/stdlib/ArrayBridge.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//
1515
// RUN: %gyb %s -o %t/ArrayBridge.swift
1616
// RUN: %target-clang %S/Inputs/ArrayBridge/ArrayBridge.m -c -o %t/ArrayBridgeObjC.o -g
17-
// RUN: %line-directive %t/ArrayBridge.swift -- %target-build-swift %t/ArrayBridge.swift -I %S/Inputs/ArrayBridge/ -Xlinker %t/ArrayBridgeObjC.o -o %t/ArrayBridge -swift-version 3 --
17+
// RUN: %line-directive %t/ArrayBridge.swift -- %target-build-swift %t/ArrayBridge.swift -I %S/Inputs/ArrayBridge/ -Xlinker %t/ArrayBridgeObjC.o -o %t/ArrayBridge -swift-version 4.2 --
1818

1919
// RUN: %target-codesign %t/ArrayBridge
2020
// RUN: %target-run %t/ArrayBridge
@@ -127,7 +127,7 @@ func == (lhs: BridgeableValue, rhs: BridgeableValue) -> Bool {
127127

128128
// A class used to test various Objective-C thunks.
129129
class Thunks : NSObject {
130-
func createSubclass(_ value: Int) -> AnyObject {
130+
@objc func createSubclass(_ value: Int) -> AnyObject {
131131
return Subclass(value)
132132
}
133133

@@ -296,8 +296,8 @@ tests.test("testExplicitlyBridged/${Any}") {
296296

297297
let bridgeableValuesAsNSArray = bridgeableValues as NSArray
298298
expectEqual(2, bridgeableValuesAsNSArray.count)
299-
expectEqual(42, (bridgeableValuesAsNSArray[0] as AnyObject).value)
300-
expectEqual(17, (bridgeableValuesAsNSArray[1] as AnyObject).value)
299+
expectEqual(42, (bridgeableValuesAsNSArray[0] as! Subclass).value)
300+
expectEqual(17, (bridgeableValuesAsNSArray[1] as! Subclass).value)
301301

302302
// Make sure we can bridge back.
303303
let roundTrippedValues = Swift._forceBridgeFromObjectiveC(

test/stdlib/Intents.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -o %t/a.out3 -swift-version 3 && %target-codesign %t/a.out3 && %target-run %t/a.out3
32
// RUN: %target-build-swift %s -o %t/a.out4 -swift-version 4 && %target-codesign %t/a.out4 && %target-run %t/a.out4
3+
// RUN: %target-build-swift %s -o %t/a.out42 -swift-version 4.2 && %target-codesign %t/a.out42 && %target-run %t/a.out42
44
// REQUIRES: executable_test
55
// REQUIRES: objc_interop
66

@@ -11,11 +11,7 @@ import StdlibUnittest
1111

1212
let IntentsTestSuite = TestSuite("Intents")
1313

14-
#if swift(>=4)
1514
let swiftVersion = "4"
16-
#else
17-
let swiftVersion = "3"
18-
#endif
1915

2016
if #available(OSX 10.12, iOS 10.0, watchOS 3.2, *) {
2117

@@ -46,10 +42,6 @@ if #available(iOS 11.0, *) {
4642
func f(profile: INSetProfileInCarIntent) {
4743
var isDefaultProfile = profile.isDefaultProfile
4844
expectType(Bool?.self, &isDefaultProfile)
49-
#if !swift(>=4)
50-
var defaultProfile = profile.defaultProfile
51-
expectType(Int?.self, &defaultProfile)
52-
#endif
5345
}
5446
}
5547
}

test/stdlib/UIKit.swift

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -swift-version 3 %s -o %t/a.out3 && %target-codesign %t/a.out3 && %target-run %t/a.out3
32
// RUN: %target-build-swift -swift-version 4 %s -o %t/a.out4 && %target-codesign %t/a.out4 && %target-run %t/a.out4
43
// RUN: %target-build-swift -swift-version 4.2 %s -o %t/a.out4_2 && %target-codesign %t/a.out4_2 && %target-run %t/a.out4_2
54
// REQUIRES: executable_test
@@ -12,10 +11,8 @@ import StdlibUnittestFoundationExtras
1211

1312
#if swift(>=4.2)
1413
let UIKitTests = TestSuite("UIKit_Swift4_2")
15-
#elseif swift(>=4)
16-
let UIKitTests = TestSuite("UIKit_Swift4")
1714
#else
18-
let UIKitTests = TestSuite("UIKit_Swift3")
15+
let UIKitTests = TestSuite("UIKit_Swift4")
1916
#endif
2017

2118
#if !os(watchOS) && !os(tvOS)
@@ -144,41 +141,26 @@ UIKitTests.test("UIFont.Weight") {
144141

145142
#if !os(watchOS)
146143
UIKitTests.test("UILayoutPriority") {
147-
#if swift(>=4) // Swift 4
148-
let lowLayoutPriority: UILayoutPriority = .defaultLow
149-
let highLayoutPriority: UILayoutPriority = .defaultHigh
150-
151-
expectTrue(lowLayoutPriority < highLayoutPriority)
144+
let lowLayoutPriority: UILayoutPriority = .defaultLow
145+
let highLayoutPriority: UILayoutPriority = .defaultHigh
152146

153-
expectTrue(lowLayoutPriority + 2.0 == UILayoutPriority(lowLayoutPriority.rawValue + 2.0))
154-
expectTrue(2.0 + lowLayoutPriority == UILayoutPriority(lowLayoutPriority.rawValue + 2.0))
155-
expectTrue(lowLayoutPriority - 2.0 == UILayoutPriority(lowLayoutPriority.rawValue - 2.0))
156-
expectTrue(highLayoutPriority - lowLayoutPriority == highLayoutPriority.rawValue - lowLayoutPriority.rawValue)
147+
expectTrue(lowLayoutPriority < highLayoutPriority)
157148

158-
expectTrue(lowLayoutPriority + (highLayoutPriority - lowLayoutPriority) == highLayoutPriority)
149+
expectTrue(lowLayoutPriority + 2.0 == UILayoutPriority(lowLayoutPriority.rawValue + 2.0))
150+
expectTrue(2.0 + lowLayoutPriority == UILayoutPriority(lowLayoutPriority.rawValue + 2.0))
151+
expectTrue(lowLayoutPriority - 2.0 == UILayoutPriority(lowLayoutPriority.rawValue - 2.0))
152+
expectTrue(highLayoutPriority - lowLayoutPriority == highLayoutPriority.rawValue - lowLayoutPriority.rawValue)
159153

160-
var mutablePriority = lowLayoutPriority
161-
mutablePriority -= 1.0
162-
mutablePriority += 2.0
163-
expectTrue(mutablePriority == lowLayoutPriority + 1.0)
154+
expectTrue(lowLayoutPriority + (highLayoutPriority - lowLayoutPriority) == highLayoutPriority)
164155

165-
let priorotyRange = lowLayoutPriority...highLayoutPriority
166-
expectTrue(priorotyRange.contains(.defaultLow))
167-
expectFalse(priorotyRange.contains(.required))
168-
#else // Swift 3
169-
let lowLayoutPriority: UILayoutPriority = UILayoutPriorityDefaultLow
170-
let highLayoutPriority: UILayoutPriority = UILayoutPriorityDefaultHigh
171-
172-
expectTrue(lowLayoutPriority < highLayoutPriority)
156+
var mutablePriority = lowLayoutPriority
157+
mutablePriority -= 1.0
158+
mutablePriority += 2.0
159+
expectTrue(mutablePriority == lowLayoutPriority + 1.0)
173160

174-
expectTrue(2.0 + lowLayoutPriority == lowLayoutPriority + 2.0)
175-
expectTrue(lowLayoutPriority + (highLayoutPriority - lowLayoutPriority) == highLayoutPriority)
176-
177-
var mutablePriority = lowLayoutPriority
178-
mutablePriority -= 1.0
179-
mutablePriority += 2.0
180-
expectTrue(mutablePriority == lowLayoutPriority + 1.0)
181-
#endif
161+
let priorotyRange = lowLayoutPriority...highLayoutPriority
162+
expectTrue(priorotyRange.contains(.defaultLow))
163+
expectFalse(priorotyRange.contains(.required))
182164
}
183165
#endif
184166

validation-test/stdlib/ArrayBridging.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o
44
// RUN: echo '#sourceLocation(file: "%s", line: 1)' > "%t/main.swift" && cat "%s" >> "%t/main.swift" && chmod -w "%t/main.swift"
5-
// RUN: %target-build-swift -Xfrontend -disable-access-control -I %S/Inputs/SlurpFastEnumeration/ %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift -Xlinker %t/SlurpFastEnumeration.o -o %t.out -O -swift-version 3
5+
// RUN: %target-build-swift -Xfrontend -disable-access-control -I %S/Inputs/SlurpFastEnumeration/ %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift -Xlinker %t/SlurpFastEnumeration.o -o %t.out -O -swift-version 4
66
// RUN: %target-run %t.out
77
// REQUIRES: executable_test
88

validation-test/stdlib/ArrayNew.swift.gyb

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// RUN: %gyb %s -o %t/main.swift
44
// RUN: if [ %target-runtime == "objc" ]; then \
55
// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o; \
6-
// RUN: %line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift %t/main.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Array -Xfrontend -disable-access-control -swift-version 3; \
6+
// RUN: %line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift %t/main.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Array -Xfrontend -disable-access-control -swift-version 4.2; \
77
// RUN: else \
8-
// RUN: %line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %t/main.swift -o %t/Array -Xfrontend -disable-access-control -swift-version 3; \
8+
// RUN: %line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %t/main.swift -o %t/Array -Xfrontend -disable-access-control -swift-version 4.2; \
99
// RUN: fi
1010
// RUN: %target-codesign %t/Array && %line-directive %t/main.swift -- %target-run %t/Array
1111
// REQUIRES: executable_test
@@ -372,7 +372,7 @@ ArrayTestSuite.test("BridgedFromObjC.Verbatim.ArrayIsCopied") {
372372
expectEqual(30, (nsa[1] as! TestObjCValueTy).value)
373373

374374
// Check that the Array is not affected.
375-
expectEqual(20, result[1].value)
375+
expectEqual(20, (result[1] as! TestObjCValueTy).value)
376376
}
377377

378378
ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.ArrayIsCopied") {
@@ -393,8 +393,8 @@ ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.ArrayIsCopied") {
393393

394394
ArrayTestSuite.test("BridgedFromObjC.Verbatim.NSArrayIsRetained") {
395395
let nsa = NSArray(array: getAsNSArray([ 10, 20, 30 ]))
396-
var a: Array<AnyObject> = convertNSArrayToArray(nsa)
397-
var bridgedBack: NSArray = convertArrayToNSArray(a)
396+
let a: Array<AnyObject> = convertNSArrayToArray(nsa)
397+
let bridgedBack: NSArray = convertArrayToNSArray(a)
398398

399399
expectEqual(
400400
unsafeBitCast(nsa, to: Int.self),
@@ -407,8 +407,8 @@ ArrayTestSuite.test("BridgedFromObjC.Verbatim.NSArrayIsRetained") {
407407

408408
ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.NSArrayIsCopied") {
409409
let nsa = NSArray(array: getAsNSArray([ 10, 20, 30 ]))
410-
var a: Array<TestBridgedValueTy> = convertNSArrayToArray(nsa)
411-
var bridgedBack: NSArray = convertArrayToNSArray(a)
410+
let a: Array<TestBridgedValueTy> = convertNSArrayToArray(nsa)
411+
let bridgedBack: NSArray = convertArrayToNSArray(a)
412412

413413
expectNotEqual(
414414
unsafeBitCast(nsa, to: Int.self),
@@ -542,11 +542,9 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/objectAtIndex") {
542542
expectEqual(30, (v as! TestObjCValueTy).value)
543543
let idValue2 = unsafeBitCast(v, to: UInt.self)
544544

545-
for i in 0..<3 {
546-
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
547-
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
548-
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
549-
}
545+
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
546+
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
547+
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
550548

551549
expectAutoreleasedKeysAndValues(unopt: (0, 3))
552550
}
@@ -602,11 +600,9 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/getObjects") {
602600
expectEqual(30, (v as! TestObjCValueTy).value)
603601
let idValue2 = unsafeBitCast(v, to: UInt.self)
604602

605-
for i in 0..<3 {
606-
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
607-
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
608-
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
609-
}
603+
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
604+
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
605+
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
610606

611607
buffer.deallocate()
612608
_fixLifetime(a)
@@ -815,11 +811,9 @@ ArrayTestSuite.test("BridgedToObjC/Custom/objectAtIndex") {
815811
expectEqual(30, (v as! TestObjCValueTy).value)
816812
let idValue2 = unsafeBitCast(v, to: UInt.self)
817813

818-
for i in 0..<3 {
819-
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
820-
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
821-
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
822-
}
814+
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
815+
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
816+
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
823817

824818
expectEqual(3, TestBridgedValueTy.bridgeOperations)
825819
expectAutoreleasedKeysAndValues(unopt: (0, 3))
@@ -876,11 +870,9 @@ ArrayTestSuite.test("BridgedToObjC/Custom/getObjects") {
876870
expectEqual(30, (v as! TestObjCValueTy).value)
877871
let idValue2 = unsafeBitCast(v, to: UInt.self)
878872

879-
for i in 0..<3 {
880-
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
881-
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
882-
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
883-
}
873+
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
874+
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
875+
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
884876

885877
buffer.deallocate()
886878
_fixLifetime(a)
@@ -1119,14 +1111,14 @@ ArrayTestSuite.test("BridgedToObjC.Nonverbatim.RoundtripThroughSwiftArray") {
11191111
TestBridgedValueTy.bridgeOperations = 0
11201112
let nsa: NSArray = getAsImmutableNSArray([ 10, 20, 30 ])
11211113
let a: Array<TestBridgedValueTy> = convertNSArrayToArray(nsa)
1122-
let bridgedBack = convertArrayToNSArray(a)
1114+
let _ = convertArrayToNSArray(a)
11231115
expectEqual(3, TestBridgedValueTy.bridgeOperations)
11241116
}
11251117
do {
11261118
TestBridgedValueTy.bridgeOperations = 0
11271119
let nsa: NSArray = getAsImmutableNSArray([ 10, 20, 30 ])
11281120
let a = nsa as! Array<TestBridgedValueTy>
1129-
let bridgedBack: NSArray = a as NSArray
1121+
let _: NSArray = a as NSArray
11301122
expectEqual(3, TestBridgedValueTy.bridgeOperations)
11311123
}
11321124
}

validation-test/stdlib/ArrayTrapsObjC.swift.gyb renamed to validation-test/stdlib/ArrayTrapsObjC.swift

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %gyb %s -o %t/ArrayTraps.swift
3-
// RUN: %line-directive %t/ArrayTraps.swift -- %target-build-swift %t/ArrayTraps.swift -o %t/a.out_Debug -Onone -swift-version 3
4-
// RUN: %line-directive %t/ArrayTraps.swift -- %target-build-swift %t/ArrayTraps.swift -o %t/a.out_Release -O -swift-version 3
5-
//
6-
// RUN: %target-codesign %t/a.out_Debug
7-
// RUN: %target-codesign %t/a.out_Release
8-
// RUN: %line-directive %t/ArrayTraps.swift -- %target-run %t/a.out_Debug
9-
// RUN: %line-directive %t/ArrayTraps.swift -- %target-run %t/a.out_Release
2+
// RUN: %target-build-swift %s -o %t/a.out_Debug -Onone -swift-version 4.2 && %target-codesign %t/a.out_Debug && %target-run %t/a.out_Debug
3+
// RUN: %target-build-swift %s -o %t/a.out_Release -O -swift-version 4.2 && %target-codesign %t/a.out_Release && %target-run %t/a.out_Release
104
// REQUIRES: executable_test
115
// REQUIRES: objc_interop
126

@@ -28,7 +22,7 @@ ArrayTraps.test("downcast1")
2822
.code {
2923
let ba: [Base] = [ Derived(), Base() ]
3024
let da = ba as! [Derived]
31-
let d0 = da[0]
25+
_ = da[0]
3226
expectCrashLater()
3327
_ = da[1]
3428
}
@@ -40,7 +34,7 @@ ArrayTraps.test("downcast2")
4034
.code {
4135
let a: [AnyObject] = ["String" as NSString, 1 as NSNumber]
4236
let sa = a as! [NSString]
43-
let s0 = sa[0]
37+
_ = sa[0]
4438
expectCrashLater()
4539
_ = sa[1]
4640
}
@@ -52,10 +46,10 @@ ArrayTraps.test("downcast3")
5246
.code {
5347
let ba: [Base] = [ Derived2(), Derived(), Base() ]
5448
let d2a = ba as! [Derived2]
55-
let d2a0 = d2a[0]
49+
_ = d2a[0]
5650
let d1a = d2a as [Derived]
57-
let d1a0 = d1a[0]
58-
let d1a1 = d1a[1]
51+
_ = d1a[0]
52+
_ = d1a[1]
5953
expectCrashLater()
6054
_ = d1a[2]
6155
}
@@ -71,7 +65,7 @@ ArrayTraps.test("downcast4")
7165
.code {
7266
let ba: [ObjCProto] = [ ObjCDerived(), ObjCBase() ]
7367
let da = ba as! [ObjCDerived]
74-
let d0 = da[0]
68+
_ = da[0]
7569
expectCrashLater()
7670
_ = da[1]
7771
}
@@ -86,7 +80,7 @@ ArrayTraps.test("bounds_with_downcast")
8680
let ba: [Base] = [ Derived(), Base() ]
8781
let da = ba as! [Derived]
8882
expectCrashLater()
89-
let x = da[2]
83+
_ = da[2]
9084
}
9185

9286
var ArraySemanticOptzns = TestSuite("ArraySemanticOptzns" + testSuiteSuffix)
@@ -138,7 +132,7 @@ ArraySemanticOptzns.test("inout_rule_violated_isNativeBuffer")
138132
{ _isFastAssertConfiguration() },
139133
reason: "this trap is not guaranteed to happen in -Ounchecked"))
140134
.crashOutputMatches(_isDebugAssertConfiguration() ?
141-
"Fatal error: inout rules were violated: the array was overwritten" : "")
135+
"Fatal access conflict detected." : "")
142136
.code {
143137
let v = ViolateInoutSafetySwitchToObjcBuffer()
144138
expectCrashLater()
@@ -181,7 +175,7 @@ ArraySemanticOptzns.test("inout_rule_violated_needsElementTypeCheck")
181175
{ _isFastAssertConfiguration() },
182176
reason: "this trap is not guaranteed to happen in -Ounchecked"))
183177
.crashOutputMatches(_isDebugAssertConfiguration() ?
184-
"Fatal error: inout rules were violated: the array was overwritten" : "")
178+
"Fatal access conflict detected." : "")
185179
.code {
186180
let v = ViolateInoutSafetyNeedElementTypeCheck()
187181
expectCrashLater()

validation-test/stdlib/CollectionCompatibility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: rm -rf %t ; mkdir -p %t
2-
// RUN: %target-build-swift %s -o %t/a.out3 -swift-version 3 && %target-codesign %t/a.out3 && %target-run %t/a.out3
32
// RUN: %target-build-swift %s -o %t/a.out4 -swift-version 4 && %target-codesign %t/a.out4 && %target-run %t/a.out4
3+
// RUN: %target-build-swift %s -o %t/a.out42 -swift-version 4.2 && %target-codesign %t/a.out42 && %target-run %t/a.out42
44

55
// REQUIRES: executable_test
66

validation-test/stdlib/DictionaryBridging.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o
44
// RUN: echo '#sourceLocation(file: "%s", line: 1)' > "%t/main.swift" && cat "%s" >> "%t/main.swift" && chmod -w "%t/main.swift"
5-
// RUN: %target-build-swift -Xfrontend -disable-access-control -I %S/Inputs/SlurpFastEnumeration/ %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift -Xlinker %t/SlurpFastEnumeration.o -o %t.out -O -swift-version 3
5+
// RUN: %target-build-swift -Xfrontend -disable-access-control -I %S/Inputs/SlurpFastEnumeration/ %t/main.swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift -Xlinker %t/SlurpFastEnumeration.o -o %t.out -O -swift-version 4.2
66
// RUN: %target-run %t.out
77
// REQUIRES: executable_test
88
// REQUIRES: stress_test

0 commit comments

Comments
 (0)