Skip to content

Commit 3dd622b

Browse files
committed
Remove coding from testing as well. Add tests to the Xcode project.
1 parent 6be80a7 commit 3dd622b

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

Foundation.xcodeproj/project.pbxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
03B6F5841F15F339004F25AF /* TestURLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B6F5831F15F339004F25AF /* TestURLProtocol.swift */; };
1212
1513A8432044893F00539722 /* FileManager_XDG.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1513A8422044893F00539722 /* FileManager_XDG.swift */; };
1313
1520469B1D8AEABE00D02E36 /* HTTPServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1520469A1D8AEABE00D02E36 /* HTTPServer.swift */; };
14-
152EF3942283457C001E1269 /* TestNSSortDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 152EF3932283457B001E1269 /* TestNSSortDescriptor.swift */; };
14+
1539391422A07007006DFF4F /* TestCachedURLResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1539391322A07007006DFF4F /* TestCachedURLResponse.swift */; };
1515
153CC8352215E00200BFE8F3 /* ScannerAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 153CC8322214C3D100BFE8F3 /* ScannerAPI.swift */; };
1616
153E951120111DC500F250BE /* CFKnownLocations.h in Headers */ = {isa = PBXBuildFile; fileRef = 153E950F20111DC500F250BE /* CFKnownLocations.h */; settings = {ATTRIBUTES = (Private, ); }; };
1717
153E951220111DC500F250BE /* CFKnownLocations.c in Sources */ = {isa = PBXBuildFile; fileRef = 153E951020111DC500F250BE /* CFKnownLocations.c */; };
@@ -616,6 +616,7 @@
616616
1513A8422044893F00539722 /* FileManager_XDG.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManager_XDG.swift; sourceTree = "<group>"; };
617617
1520469A1D8AEABE00D02E36 /* HTTPServer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPServer.swift; sourceTree = "<group>"; };
618618
152EF3932283457B001E1269 /* TestNSSortDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNSSortDescriptor.swift; sourceTree = "<group>"; };
619+
1539391322A07007006DFF4F /* TestCachedURLResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCachedURLResponse.swift; sourceTree = "<group>"; };
619620
153CC8322214C3D100BFE8F3 /* ScannerAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannerAPI.swift; sourceTree = "<group>"; };
620621
153E950F20111DC500F250BE /* CFKnownLocations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CFKnownLocations.h; sourceTree = "<group>"; };
621622
153E951020111DC500F250BE /* CFKnownLocations.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = CFKnownLocations.c; sourceTree = "<group>"; };
@@ -1711,6 +1712,7 @@
17111712
EA66F63C1BF1619600136161 /* TestNSArray.swift */,
17121713
294E3C1C1CC5E19300E4F44C /* TestNSAttributedString.swift */,
17131714
90E645DE1E4C89A400D0D47C /* TestNSCache.swift */,
1715+
1539391322A07007006DFF4F /* TestCachedURLResponse.swift */,
17141716
52829AD61C160D64003BC4EF /* TestCalendar.swift */,
17151717
15F10CDB218909BF00D88114 /* TestNSCalendar.swift */,
17161718
5BC1D8BC1BF3ADFE009D3973 /* TestCharacterSet.swift */,
@@ -2877,6 +2879,7 @@
28772879
7D8BD739225ED1480057CF37 /* TestMeasurement.swift in Sources */,
28782880
CD1C7F7D1E303B47008E331C /* TestNSError.swift in Sources */,
28792881
294E3C1D1CC5E19300E4F44C /* TestNSAttributedString.swift in Sources */,
2882+
1539391422A07007006DFF4F /* TestCachedURLResponse.swift in Sources */,
28802883
5B13B3431C582D4C00651CE2 /* TestScanner.swift in Sources */,
28812884
5B13B3401C582D4C00651CE2 /* TestNSRange.swift in Sources */,
28822885
5B13B3371C582D4C00651CE2 /* TestNotificationCenter.swift in Sources */,

TestFoundation/TestCachedURLResponse.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@
88
//
99

1010
class TestCachedURLResponse : XCTestCase {
11-
func test_NSCoding() throws {
12-
let url = try URL(string: "http://example.com/").unwrapped()
13-
let response = URLResponse(url: url, mimeType: nil, expectedContentLength: -1, textEncodingName: nil)
14-
let bytes: [UInt8] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
15-
let data = Data(bytes: bytes, count: bytes.count)
16-
let userInfo: [AnyHashable: Any] = ["Key1": "Value1", "Key2": "Value2"]
17-
let storagePolicy = URLCache.StoragePolicy.allowedInMemoryOnly
18-
let cachedResponse = CachedURLResponse(response: response, data: data, userInfo: userInfo, storagePolicy: storagePolicy)
19-
20-
let unarchivedResponse = NSKeyedUnarchiver.unarchiveObject(with: NSKeyedArchiver.archivedData(withRootObject: cachedResponse)) as! CachedURLResponse
21-
22-
XCTAssertEqual(cachedResponse.response, unarchivedResponse.response)
23-
XCTAssertEqual(cachedResponse.data, unarchivedResponse.data)
24-
XCTAssertEqual(cachedResponse.userInfo?.keys, unarchivedResponse.userInfo?.keys)
25-
XCTAssertEqual(cachedResponse.storagePolicy, unarchivedResponse.storagePolicy)
26-
}
27-
2811
func test_copy() throws {
2912
let url = try URL(string: "http://example.com/").unwrapped()
3013
let response = URLResponse(url: url, mimeType: nil, expectedContentLength: -1, textEncodingName: nil)
@@ -208,7 +191,6 @@ class TestCachedURLResponse : XCTestCase {
208191

209192
static var allTests: [(String, (TestCachedURLResponse) -> () throws -> Void)] {
210193
return [
211-
("test_NSCoding", test_NSCoding),
212194
("test_copy", test_copy),
213195
("test_initDefaultUserInfoAndStoragePolicy", test_initDefaultUserInfoAndStoragePolicy),
214196
("test_initDefaultUserInfo", test_initDefaultUserInfo),

0 commit comments

Comments
 (0)