Skip to content

Commit b72b3d8

Browse files
committed
# This is a combination of 7 commits.
# The first commit's message is: x # This is the 2nd commit message: Corrected bad wrong link to API design guidelines Link has probably been changed since the creation of the file. # This is the 3rd commit message: Disable test_completePathIntoString tests since it can take a very long time SR-644 to follow-up on this. # This is the 4th commit message: Fix key's typo to NSFileGroupOwnerAccountName The key NSFileGroupOwnerAccountId is a typo as it is later overwritten by an NSNumber on line 381. The correct constant is NSFileGroupOwnerAccountName to correctly add the String of the account's name to the dictionary. # This is the 5th commit message: Revert "Fix key's typo to NSFileGroupOwnerAccountName" # This is the 6th commit message: Added few tests for NSMutableCharacterSet # This is the 7th commit message: Implement NSTemporaryDirectory * Darwin should check against `confstr` using `_CS_DARWIN_USER_TEMP_DIR` * All platforms check against TMPDIR environment variable * Fall back to /tmp/
1 parent 1e24318 commit b72b3d8

File tree

6 files changed

+138
-9
lines changed

6 files changed

+138
-9
lines changed

Foundation.xcodeproj/project.pbxproj

Lines changed: 101 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,55 @@
99
/* Begin PBXBuildFile section */
1010
528776141BF2629700CB0090 /* FoundationErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522C253A1BF16E1600804FC6 /* FoundationErrors.swift */; };
1111
528776191BF27D9500CB0090 /* Test.plist in Resources */ = {isa = PBXBuildFile; fileRef = 528776181BF27D9500CB0090 /* Test.plist */; };
12+
<<<<<<< HEAD
13+
=======
14+
5B13B3251C582D4700651CE2 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F6381BF1619600136161 /* main.swift */; };
15+
5B13B3261C582D4C00651CE2 /* TestNSAffineTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = C93559281C12C49F009FD6A9 /* TestNSAffineTransform.swift */; };
16+
5B13B3271C582D4C00651CE2 /* TestNSArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F63C1BF1619600136161 /* TestNSArray.swift */; };
17+
5B13B3281C582D4C00651CE2 /* TestNSBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E203B8C1C1303BB003B2576 /* TestNSBundle.swift */; };
18+
5B13B3291C582D4C00651CE2 /* TestNSCalendar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52829AD61C160D64003BC4EF /* TestNSCalendar.swift */; };
19+
5B13B32A1C582D4C00651CE2 /* TestNSCharacterSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC1D8BC1BF3ADFE009D3973 /* TestNSCharacterSet.swift */; };
20+
5B13B32B1C582D4C00651CE2 /* TestNSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCDBB8321C1768AC00313299 /* TestNSData.swift */; };
21+
5B13B32C1C582D4C00651CE2 /* TestNSDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22B9C1E01C165D7A00DECFF9 /* TestNSDate.swift */; };
22+
5B13B32D1C582D4C00651CE2 /* TestNSDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F63D1BF1619600136161 /* TestNSDictionary.swift */; };
23+
5B13B32E1C582D4C00651CE2 /* TestNSFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525AECEB1BF2C96400D15BB0 /* TestNSFileManager.swift */; };
24+
5B13B32F1C582D4C00651CE2 /* TestNSGeometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88D28DE61C13AE9000494606 /* TestNSGeometry.swift */; };
25+
5B13B3301C582D4C00651CE2 /* TestNSHTTPCookie.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848A30571C137B3500C83206 /* TestNSHTTPCookie.swift */; };
26+
5B13B3311C582D4C00651CE2 /* TestNSIndexPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AE109261C17CCBF007367B5 /* TestNSIndexPath.swift */; };
27+
5B13B3321C582D4C00651CE2 /* TestNSIndexSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F63E1BF1619600136161 /* TestNSIndexSet.swift */; };
28+
5B13B3331C582D4C00651CE2 /* TestNSJSONSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EB6A15C1C188FC40037DCB8 /* TestNSJSONSerialization.swift */; };
29+
5B13B3341C582D4C00651CE2 /* TestNSKeyedArchiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A597F11C33C68E00295652 /* TestNSKeyedArchiver.swift */; };
30+
5B13B3351C582D4C00651CE2 /* TestNSKeyedUnarchiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A597EF1C33A9E500295652 /* TestNSKeyedUnarchiver.swift */; };
31+
5B13B3361C582D4C00651CE2 /* TestNSLocale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A395F91C2484490029B337 /* TestNSLocale.swift */; };
32+
5B13B3371C582D4C00651CE2 /* TestNSNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F8AE7C1C180FC600FB62F0 /* TestNSNotificationCenter.swift */; };
33+
5B13B3381C582D4C00651CE2 /* TestNSNotificationQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EF673AB1C28B527006212A3 /* TestNSNotificationQueue.swift */; };
34+
5B13B3391C582D4C00651CE2 /* TestNSNull.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17921C48631C00935030 /* TestNSNull.swift */; };
35+
5B13B33A1C582D4C00651CE2 /* TestNSNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F63F1BF1619600136161 /* TestNSNumber.swift */; };
36+
5B13B33B1C582D4C00651CE2 /* TestNSNumberFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17931C48631C00935030 /* TestNSNumberFormatter.swift */; };
37+
5B13B33C1C582D4C00651CE2 /* TestNSOrderedSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D834F9931C31C4060023812A /* TestNSOrderedSet.swift */; };
38+
5B13B33D1C582D4C00651CE2 /* TestNSPipe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC1D07F1C12EEEF00B5948A /* TestNSPipe.swift */; };
39+
5B13B33E1C582D4C00651CE2 /* TestNSProcessInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 400E22641C1A4E58007C5933 /* TestNSProcessInfo.swift */; };
40+
5B13B33F1C582D4C00651CE2 /* TestNSPropertyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F6401BF1619600136161 /* TestNSPropertyList.swift */; };
41+
5B13B3401C582D4C00651CE2 /* TestNSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = E876A73D1C1180E000F279EC /* TestNSRange.swift */; };
42+
5B13B3411C582D4C00651CE2 /* TestNSRegularExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0C6C211C1E07E600705A0E /* TestNSRegularExpression.swift */; };
43+
5B13B3421C582D4C00651CE2 /* TestNSRunLoop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61E0117B1C1B554D000037DD /* TestNSRunLoop.swift */; };
44+
5B13B3431C582D4C00651CE2 /* TestNSScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844DC3321C17584F005611F9 /* TestNSScanner.swift */; };
45+
5B13B3441C582D4C00651CE2 /* TestNSSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F6411BF1619600136161 /* TestNSSet.swift */; };
46+
5B13B3451C582D4C00651CE2 /* TestNSString.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F6421BF1619600136161 /* TestNSString.swift */; };
47+
5B13B3461C582D4C00651CE2 /* TestNSTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17941C48631C00935030 /* TestNSTask.swift */; };
48+
5B13B3471C582D4C00651CE2 /* TestNSThread.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5835F31C20C9B500C81317 /* TestNSThread.swift */; };
49+
5B13B3481C582D4C00651CE2 /* TestNSTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61D6C9EE1C1DFE9500DEF583 /* TestNSTimer.swift */; };
50+
5B13B3491C582D4C00651CE2 /* TestNSTimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA558D1C16F90900F48C54 /* TestNSTimeZone.swift */; };
51+
5B13B34A1C582D4C00651CE2 /* TestNSURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F6431BF1619600136161 /* TestNSURL.swift */; };
52+
5B13B34B1C582D4C00651CE2 /* TestNSURLRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83712C8D1C1684900049AD49 /* TestNSURLRequest.swift */; };
53+
5B13B34C1C582D4C00651CE2 /* TestNSURLResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A7D6FBA1C16439400957E2E /* TestNSURLResponse.swift */; };
54+
5B13B34D1C582D4C00651CE2 /* TestNSUUID.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2A9D75B1C15C08B00993803 /* TestNSUUID.swift */; };
55+
5B13B34E1C582D4C00651CE2 /* TestNSXMLDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17951C48631C00935030 /* TestNSXMLDocument.swift */; };
56+
5B13B34F1C582D4C00651CE2 /* TestNSXMLParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B40F9F11C125187000E72E3 /* TestNSXMLParser.swift */; };
57+
5B13B3501C582D4C00651CE2 /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17961C48631C00935030 /* TestUtils.swift */; };
58+
5B13B3511C582D4C00651CE2 /* TestNSByteCountFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5A34B551C18C85D00FD972B /* TestNSByteCountFormatter.swift */; };
59+
5B13B3521C582D4C00651CE2 /* TestNSValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3047AEB1C38BC3300295652 /* TestNSValue.swift */; };
60+
>>>>>>> 0345d84... re-import tests to test TestFoundation target
1261
5B2B59821C24D00500271109 /* CFStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D89031BBC9BC300234F36 /* CFStream.c */; };
1362
5B2B59831C24D00C00271109 /* CFSocketStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D89871BBDB1B400234F36 /* CFSocketStream.c */; };
1463
5B2B59841C24D01100271109 /* CFConcreteStreams.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D89831BBDB13800234F36 /* CFConcreteStreams.c */; };
@@ -17,6 +66,7 @@
1766
5B40F9F41C12524C000E72E3 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B40F9F31C12524C000E72E3 /* libxml2.dylib */; };
1867
5B5D89761BBDADD300234F36 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5D89751BBDADD300234F36 /* libicucore.dylib */; };
1968
5B5D89781BBDADDB00234F36 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5D89771BBDADDB00234F36 /* libz.dylib */; };
69+
<<<<<<< HEAD
2070
5B6F176C1C4862F100935030 /* TestNSAffineTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = C93559281C12C49F009FD6A9 /* TestNSAffineTransform.swift */; };
2171
5B6F176D1C4862F100935030 /* TestNSArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA66F63C1BF1619600136161 /* TestNSArray.swift */; };
2272
5B6F176E1C4862F100935030 /* TestNSBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E203B8C1C1303BB003B2576 /* TestNSBundle.swift */; };
@@ -60,6 +110,8 @@
60110
5B6F17991C48631C00935030 /* TestNSTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17941C48631C00935030 /* TestNSTask.swift */; };
61111
5B6F179A1C48631C00935030 /* TestNSXMLDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17951C48631C00935030 /* TestNSXMLDocument.swift */; };
62112
5B6F179B1C48631C00935030 /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6F17961C48631C00935030 /* TestUtils.swift */; };
113+
=======
114+
>>>>>>> 0345d84... re-import tests to test TestFoundation target
63115
5B7C8A721BEA7FCE00C5B690 /* CFBase.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D895D1BBDABBF00234F36 /* CFBase.c */; };
64116
5B7C8A731BEA7FCE00C5B690 /* CFFileUtilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D89851BBDB18D00234F36 /* CFFileUtilities.c */; };
65117
5B7C8A741BEA7FCE00C5B690 /* CFPlatform.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B5D897B1BBDAE0800234F36 /* CFPlatform.c */; };
@@ -250,8 +302,6 @@
250302
D31302011C30CEA900295652 /* NSConcreteValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31302001C30CEA900295652 /* NSConcreteValue.swift */; };
251303
D370696E1C394FBF00295652 /* NSKeyedUnarchiver-RangeTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D370696D1C394FBF00295652 /* NSKeyedUnarchiver-RangeTest.plist */; };
252304
D39A14011C2D6E0A00295652 /* NSKeyedUnarchiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D39A14001C2D6E0A00295652 /* NSKeyedUnarchiver.swift */; };
253-
D3A597F01C33A9E500295652 /* TestNSKeyedUnarchiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A597EF1C33A9E500295652 /* TestNSKeyedUnarchiver.swift */; };
254-
D3A597F21C33C68E00295652 /* TestNSKeyedArchiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A597F11C33C68E00295652 /* TestNSKeyedArchiver.swift */; };
255305
D3A597F41C34142600295652 /* NSKeyedUnarchiver-NotificationTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3A597F31C34142600295652 /* NSKeyedUnarchiver-NotificationTest.plist */; };
256306
D3A597F71C3415CC00295652 /* NSKeyedUnarchiver-ArrayTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3A597F51C3415CC00295652 /* NSKeyedUnarchiver-ArrayTest.plist */; };
257307
D3A597F81C3415CC00295652 /* NSKeyedUnarchiver-URLTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3A597F61C3415CC00295652 /* NSKeyedUnarchiver-URLTest.plist */; };
@@ -264,9 +314,6 @@
264314
D3E8D6D11C367AB600295652 /* NSSpecialValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E8D6D01C367AB600295652 /* NSSpecialValue.swift */; };
265315
D3E8D6D31C36982700295652 /* NSKeyedUnarchiver-EdgeInsetsTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3E8D6D21C36982700295652 /* NSKeyedUnarchiver-EdgeInsetsTest.plist */; };
266316
D3E8D6D51C36AC0C00295652 /* NSKeyedUnarchiver-RectTest.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3E8D6D41C36AC0C00295652 /* NSKeyedUnarchiver-RectTest.plist */; };
267-
D834F9941C31C4060023812A /* TestNSOrderedSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D834F9931C31C4060023812A /* TestNSOrderedSet.swift */; };
268-
DCDBB8331C1768AC00313299 /* TestNSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCDBB8321C1768AC00313299 /* TestNSData.swift */; };
269-
E19E17DC1C2225930023AF4D /* TestNSXMLDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = E19E17DB1C2225930023AF4D /* TestNSXMLDocument.swift */; };
270317
E1A03F361C4828650023AF4D /* PropertyList-1.0.dtd in Resources */ = {isa = PBXBuildFile; fileRef = E1A03F351C4828650023AF4D /* PropertyList-1.0.dtd */; };
271318
E1A03F381C482C730023AF4D /* NSXMLDTDTestData.xml in Resources */ = {isa = PBXBuildFile; fileRef = E1A03F371C482C730023AF4D /* NSXMLDTDTestData.xml */; };
272319
E1A3726F1C31EBFB0023AF4D /* NSXMLDocumentTestData.xml in Resources */ = {isa = PBXBuildFile; fileRef = E1A3726E1C31EBFB0023AF4D /* NSXMLDocumentTestData.xml */; };
@@ -1918,6 +1965,7 @@
19181965
isa = PBXSourcesBuildPhase;
19191966
buildActionMask = 2147483647;
19201967
files = (
1968+
<<<<<<< HEAD
19211969
<<<<<<< HEAD
19221970
5B6F178C1C4862F100935030 /* TestNSURLResponse.swift in Sources */,
19231971
5B6F17791C4862F100935030 /* TestNSNotificationCenter.swift in Sources */,
@@ -2009,6 +2057,54 @@
20092057
61E0117C1C1B554D000037DD /* TestNSRunLoop.swift in Sources */,
20102058
EA66F6441BF1619600136161 /* main.swift in Sources */,
20112059
>>>>>>> 3ebeded... [SR-377] preliminary support for "special" encoding types
2060+
=======
2061+
5B13B3451C582D4C00651CE2 /* TestNSString.swift in Sources */,
2062+
5B13B3471C582D4C00651CE2 /* TestNSThread.swift in Sources */,
2063+
5B13B32E1C582D4C00651CE2 /* TestNSFileManager.swift in Sources */,
2064+
5B13B3381C582D4C00651CE2 /* TestNSNotificationQueue.swift in Sources */,
2065+
5B13B3331C582D4C00651CE2 /* TestNSJSONSerialization.swift in Sources */,
2066+
5B13B33C1C582D4C00651CE2 /* TestNSOrderedSet.swift in Sources */,
2067+
5B13B34A1C582D4C00651CE2 /* TestNSURL.swift in Sources */,
2068+
5B13B34D1C582D4C00651CE2 /* TestNSUUID.swift in Sources */,
2069+
5B13B3281C582D4C00651CE2 /* TestNSBundle.swift in Sources */,
2070+
5B13B32A1C582D4C00651CE2 /* TestNSCharacterSet.swift in Sources */,
2071+
5B13B3411C582D4C00651CE2 /* TestNSRegularExpression.swift in Sources */,
2072+
5B13B3491C582D4C00651CE2 /* TestNSTimeZone.swift in Sources */,
2073+
5B13B34B1C582D4C00651CE2 /* TestNSURLRequest.swift in Sources */,
2074+
5B13B33E1C582D4C00651CE2 /* TestNSProcessInfo.swift in Sources */,
2075+
5B13B33F1C582D4C00651CE2 /* TestNSPropertyList.swift in Sources */,
2076+
5B13B32C1C582D4C00651CE2 /* TestNSDate.swift in Sources */,
2077+
5B13B33B1C582D4C00651CE2 /* TestNSNumberFormatter.swift in Sources */,
2078+
5B13B3301C582D4C00651CE2 /* TestNSHTTPCookie.swift in Sources */,
2079+
5B13B3361C582D4C00651CE2 /* TestNSLocale.swift in Sources */,
2080+
5B13B3391C582D4C00651CE2 /* TestNSNull.swift in Sources */,
2081+
5B13B3421C582D4C00651CE2 /* TestNSRunLoop.swift in Sources */,
2082+
5B13B34E1C582D4C00651CE2 /* TestNSXMLDocument.swift in Sources */,
2083+
5B13B32B1C582D4C00651CE2 /* TestNSData.swift in Sources */,
2084+
5B13B34C1C582D4C00651CE2 /* TestNSURLResponse.swift in Sources */,
2085+
5B13B3481C582D4C00651CE2 /* TestNSTimer.swift in Sources */,
2086+
5B13B32D1C582D4C00651CE2 /* TestNSDictionary.swift in Sources */,
2087+
5B13B3261C582D4C00651CE2 /* TestNSAffineTransform.swift in Sources */,
2088+
5B13B3291C582D4C00651CE2 /* TestNSCalendar.swift in Sources */,
2089+
5B13B34F1C582D4C00651CE2 /* TestNSXMLParser.swift in Sources */,
2090+
5B13B32F1C582D4C00651CE2 /* TestNSGeometry.swift in Sources */,
2091+
5B13B3351C582D4C00651CE2 /* TestNSKeyedUnarchiver.swift in Sources */,
2092+
5B13B33D1C582D4C00651CE2 /* TestNSPipe.swift in Sources */,
2093+
5B13B3341C582D4C00651CE2 /* TestNSKeyedArchiver.swift in Sources */,
2094+
5B13B3441C582D4C00651CE2 /* TestNSSet.swift in Sources */,
2095+
5B13B3321C582D4C00651CE2 /* TestNSIndexSet.swift in Sources */,
2096+
5B13B3511C582D4C00651CE2 /* TestNSByteCountFormatter.swift in Sources */,
2097+
5B13B3501C582D4C00651CE2 /* TestUtils.swift in Sources */,
2098+
5B13B3431C582D4C00651CE2 /* TestNSScanner.swift in Sources */,
2099+
5B13B3401C582D4C00651CE2 /* TestNSRange.swift in Sources */,
2100+
5B13B3371C582D4C00651CE2 /* TestNSNotificationCenter.swift in Sources */,
2101+
5B13B3251C582D4700651CE2 /* main.swift in Sources */,
2102+
5B13B33A1C582D4C00651CE2 /* TestNSNumber.swift in Sources */,
2103+
5B13B3521C582D4C00651CE2 /* TestNSValue.swift in Sources */,
2104+
5B13B3311C582D4C00651CE2 /* TestNSIndexPath.swift in Sources */,
2105+
5B13B3271C582D4C00651CE2 /* TestNSArray.swift in Sources */,
2106+
5B13B3461C582D4C00651CE2 /* TestNSTask.swift in Sources */,
2107+
>>>>>>> 0345d84... re-import tests to test TestFoundation target
20122108
);
20132109
runOnlyForDeploymentPostprocessing = 0;
20142110
};

Foundation/NSPathUtilities.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ import Darwin
1515
import Glibc
1616
#endif
1717

18+
public func NSTemporaryDirectory() -> String {
19+
#if os(OSX) || os(iOS)
20+
var buf = [Int8](count: 100, repeatedValue: 0)
21+
let r = confstr(_CS_DARWIN_USER_TEMP_DIR, &buf, buf.count)
22+
if r != 0 && r < buf.count {
23+
return String(CString: buf, encoding: NSUTF8StringEncoding)!
24+
}
25+
#endif
26+
if let tmpdir = NSProcessInfo.processInfo().environment["TMPDIR"] {
27+
return tmpdir
28+
}
29+
return "/tmp/"
30+
}
31+
1832
internal extension String {
1933

2034
internal var _startOfLastPathComponent : String.CharacterView.Index {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In our first year, we are not looking to make major API changes to the library.
2424

2525
### API Naming and Foundation
2626

27-
One of the goals of the Swift 3 project is [a new set of naming guidelines](https://swift.org/documentation/api-design-guidelines.html). The Foundation project will soon update all of its names to match the new guidelines. We will also drop the 'NS' prefix from all Foundation classes.
27+
One of the goals of the Swift 3 project is [a new set of naming guidelines](https://swift.org/documentation/api-design-guidelines/). The Foundation project will soon update all of its names to match the new guidelines. We will also drop the 'NS' prefix from all Foundation classes.
2828

2929
### Current Status
3030

TestFoundation/TestNSCharacterSet.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,25 @@ class TestNSCharacterSet : XCTestCase {
9595
}
9696

9797
func test_Mutables() {
98-
98+
let attachmentCharacterUnichar = unichar(0xFFFC)
99+
let attachmentCharacter = Character(UnicodeScalar(attachmentCharacterUnichar))
100+
101+
let attachmentCharacterRange = NSRange(Int(attachmentCharacterUnichar)..<Int(attachmentCharacterUnichar.successor()))
102+
103+
let initialSetRange = NSRange(location: 0, length: 0)
104+
let string = String(attachmentCharacter)
105+
106+
let mcset1 = NSMutableCharacterSet(range: initialSetRange)
107+
mcset1.addCharactersInRange(attachmentCharacterRange)
108+
109+
XCTAssertTrue(mcset1.characterIsMember(attachmentCharacterUnichar), "attachmentCharacter should be member of mcset1 after being added")
110+
XCTAssertNotNil(string.rangeOfCharacterFromSet(mcset1), "Range of character from mcset1 set should not be nil")
111+
112+
let mcset2 = NSMutableCharacterSet(range: initialSetRange)
113+
mcset2.addCharactersInString(string)
114+
115+
XCTAssertTrue(mcset2.characterIsMember(attachmentCharacterUnichar), "attachmentCharacter should be member of mcset2 after being added")
116+
XCTAssertNotNil(string.rangeOfCharacterFromSet(mcset2), "Range of character from mcset2 should not be nil")
99117
}
100118

101119
func test_AnnexPlanes() {

TestFoundation/TestNSString.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class TestNSString : XCTestCase {
6565
("test_FromContentsOfURL",test_FromContentsOfURL),
6666
("test_FromContentOfFile",test_FromContentOfFile),
6767
("test_swiftStringUTF16", test_swiftStringUTF16),
68-
("test_completePathIntoString", test_completePathIntoString),
68+
// This test takes forever on build servers; it has been seen up to 1852.084 seconds
69+
// ("test_completePathIntoString", test_completePathIntoString),
6970
("test_stringByTrimmingCharactersInSet", test_stringByTrimmingCharactersInSet),
7071
("test_initializeWithFormat", test_initializeWithFormat),
7172
("test_initializeWithFormat2", test_initializeWithFormat2),

0 commit comments

Comments
 (0)