Skip to content

Commit ff83ef2

Browse files
authored
Merge pull request #4693 from compnerd/equality
Tests: convert assertions in test_expandingTildeInPath to XCTAssertEqual
2 parents 0236364 + 7e087c2 commit ff83ef2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Tests/Foundation/Tests/TestNSString.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,21 +1019,22 @@ class TestNSString: LoopbackServerTest {
10191019
do {
10201020
let path: NSString = "~"
10211021
let result = path.expandingTildeInPath
1022-
XCTAssert(result == NSHomeDirectory(), "Could resolve home directory for current user")
1022+
XCTAssertEqual(result, NSHomeDirectory(), "Could resolve home directory for current user")
10231023
XCTAssertFalse(result.hasSuffix("/") && result != rootDirectory, "Result should not have a trailing path separator")
10241024
}
10251025

10261026
do {
10271027
let path: NSString = "~/"
10281028
let result = path.expandingTildeInPath
1029-
XCTAssert(result == NSHomeDirectory(), "Could resolve home directory for current user")
1029+
XCTAssertEqual(result, NSHomeDirectory(), "Could resolve home directory for current user")
10301030
XCTAssertFalse(result.hasSuffix("/") && result != rootDirectory, "Result should not have a trailing path separator")
10311031
}
10321032

10331033
do {
10341034
let path = NSString(string: "~\(NSUserName())")
10351035
let result = path.expandingTildeInPath
1036-
XCTAssert(result == NSHomeDirectory(), "Could resolve home directory for specific user")
1036+
XCTAssertEqual(result, NSHomeDirectory(),
1037+
"Could resolve home directory for specific user")
10371038
XCTAssertFalse(result.hasSuffix("/") && result != rootDirectory, "Result should not have a trailing path separator")
10381039
}
10391040

0 commit comments

Comments
 (0)