encode(_:output:) => encode(_:into processCodeUnit:)

This commit is contained in:
Dave Abrahams
2016-06-07 16:12:11 -07:00
parent b2bbd4c599
commit a68f648fab
10 changed files with 45 additions and 44 deletions

View File

@@ -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())
}