Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model

This commit is contained in:
Dmitri Gribenko
2016-04-14 13:45:27 -07:00
1151 changed files with 9048 additions and 8911 deletions

View File

@@ -55,7 +55,7 @@ var unicodeScalarCount: Int {
return count
}
func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
func nthUnicodeScalar(_ n: UInt32) -> UnicodeScalar {
var count: UInt32 = 0
for r in unicodeScalarRanges {
count += r.upperBound - r.lowerBound
@@ -68,7 +68,7 @@ func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
// `buffer` should have a length >= 4
func nsEncode<CodeUnit>(
c: UInt32,
_ c: UInt32,
_ encoding: NSStringEncoding,
_ buffer: inout [CodeUnit],
_ used: inout Int
@@ -97,7 +97,7 @@ class CodecTest<Codec : TestableUnicodeCodec> {
var nsEncodeBuffer: [CodeUnit] = Array(repeating: 0, count: 4)
var encodeBuffer: [CodeUnit] = Array(repeating: 0, count: 4)
func testOne(scalar: UnicodeScalar) {
func testOne(_ scalar: UnicodeScalar) {
/* Progress reporter
if (scalar.value % 0x1000) == 0 {
print("\(asHex(scalar.value))")
@@ -137,7 +137,7 @@ class CodecTest<Codec : TestableUnicodeCodec> {
)
}
func run(minScalarOrd: Int, _ maxScalarOrd: Int) {
func run(_ minScalarOrd: Int, _ maxScalarOrd: Int) {
print("testing \(Codec.name())")
for i in minScalarOrd..<maxScalarOrd {
testOne(nthUnicodeScalar(UInt32(i)))