Skip to content

Commit 2351085

Browse files
committed
Fix tests after allowing imports to clash with keywords
1 parent ddbecf0 commit 2351085

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

test/1_stdlib/Nil.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if unsafeNil == nil {
2525
}
2626

2727
do {
28-
try NSFileManager.defaultManager().removeItem(at: NSURL(string:"/this/file/does/not/exist")!)
28+
try NSFileManager.`default`().removeItem(at: NSURL(string:"/this/file/does/not/exist")!)
2929
} catch {
3030
print("ok !removed")
3131
// CHECK: ok !removed

test/ClangModules/sdk-bridging-header.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import Foundation
1818

19-
let `true` = Predicate.truePredicate()
19+
let `true` = Predicate.`true`()
2020
let not = Predicate.not()
2121
let and = Predicate.and([])
2222
let or = Predicate.or([not, and])

test/IDE/complete_pound_selector.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Foundation
2121
}
2222

2323
func selectorArg1(obj: NSObject) {
24-
obj.doSelector(#^SELECTOR_ARG1^#
24+
obj.`do`(#^SELECTOR_ARG1^#
2525
}
2626

2727
func selectorArg2(obj: NSObject) {

test/Interpreter/SDK/Foundation_test.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ FoundationTestSuite.test("patternMatching") {
181181
// Type checker used to crash on this.
182182
class ClassWithDtor : NSObject {
183183
deinit {
184-
let noteCenter = NSNotificationCenter.defaultCenter()
184+
let noteCenter = NSNotificationCenter.`default`()
185185
noteCenter.removeObserver(self, name: "ReceivedContentNotification", object: nil)
186186
}
187187
}

test/Interpreter/SDK/objc_array_of_classes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var NSURLSessionConfigurationUsage = TestSuite("NSURLSessionConfigurationUsage")
1111
// NSArray<Class> * in Foundation. Make sure it works.
1212
NSURLSessionConfigurationUsage.test("protocolClasses") {
1313
if let protocols = NSURLSessionConfiguration
14-
.defaultSessionConfiguration()
14+
.`default`()
1515
.protocolClasses {
1616

1717
for proto in protocols {

0 commit comments

Comments
 (0)