mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
encode(_:output:) => encode(_:into processCodeUnit:)
This commit is contained in:
@@ -101,7 +101,7 @@ func checkDecodeUTF<Codec : UnicodeCodec>(
|
||||
from: codec,
|
||||
to: UTF32.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
if expectedHead != decoded {
|
||||
return assertionFailure()
|
||||
.withDescription("\n")
|
||||
@@ -122,7 +122,7 @@ func checkDecodeUTF<Codec : UnicodeCodec>(
|
||||
from: codec,
|
||||
to: UTF32.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
if expected != decoded {
|
||||
return assertionFailure()
|
||||
.withDescription("\n")
|
||||
@@ -167,7 +167,7 @@ func checkEncodeUTF8(_ expected: [UInt8],
|
||||
from: UTF32.self,
|
||||
to: UTF8.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
expectFalse(hadError)
|
||||
if expected != encoded {
|
||||
return assertionFailure()
|
||||
@@ -2061,7 +2061,7 @@ UnicodeAPIs.test("transcode/MutableArray") {
|
||||
from: UTF16.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
expectEqual(input, transcoded)
|
||||
}
|
||||
|
||||
@@ -2074,7 +2074,7 @@ UnicodeAPIs.test("transcode/ReferenceTypedArray") {
|
||||
from: UTF16.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
expectEqual(input, transcoded)
|
||||
}
|
||||
|
||||
@@ -2102,7 +2102,7 @@ class NonContiguousNSString : NSString {
|
||||
from: UTF8.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
expectFalse(hadError)
|
||||
self.init(encoded)
|
||||
}
|
||||
@@ -2121,7 +2121,7 @@ class NonContiguousNSString : NSString {
|
||||
from: UTF32.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: true,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
expectFalse(hadError)
|
||||
self.init(encoded)
|
||||
}
|
||||
@@ -2182,7 +2182,7 @@ StringCookedViews.test("UTF8ForContiguousUTF16") {
|
||||
from: UTF32.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
|
||||
backingStorage.withUnsafeBufferPointer {
|
||||
(ptr) -> Void in
|
||||
@@ -2208,7 +2208,7 @@ StringCookedViews.test("UTF8ForContiguousUTF16") {
|
||||
from: UTF32.self,
|
||||
to: UTF8.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
|
||||
checkUTF8View(expected, subject, test.loc.withCurrentLoc())
|
||||
}
|
||||
@@ -2259,7 +2259,7 @@ StringCookedViews.test("UTF8ForNonContiguousUTF16") {
|
||||
from: UTF32.self,
|
||||
to: UTF8.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
|
||||
var nss = NonContiguousNSString(test.encoded)
|
||||
verifyThatStringIsOpaqueForCoreFoundation(nss)
|
||||
@@ -2332,7 +2332,7 @@ StringCookedViews.test("UTF16") {
|
||||
from: UTF32.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
|
||||
var nss = NonContiguousNSString(test.scalars)
|
||||
checkUTF16View(expected, nss as String, test.loc.withCurrentLoc())
|
||||
@@ -2349,7 +2349,7 @@ StringCookedViews.test("UTF16") {
|
||||
from: UTF32.self,
|
||||
to: UTF16.self,
|
||||
stoppingOnError: false,
|
||||
sendingOutputTo: output)
|
||||
into: output)
|
||||
|
||||
checkUTF16View(expected, subject, test.loc.withCurrentLoc())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user