Skip to content

Commit f8ec0b7

Browse files
committed
Revert "Minor changes due to SE-0130: Replace String.init(repeating: Character, count: Int) by String.init(repeating: Sttring, count: Int)"
This reverts commit 61ba9dd. Pushed to early. In needs to be pushed at the same time with a corresponding commit on apple/swift.
1 parent 61ba9dd commit f8ec0b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Basic/OutputByteStreamPerfTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class OutputByteStreamPerfTests: XCTestCase {
129129

130130
func test1MBOf16ByteStrings_X10() {
131131
// Test writing 1MB worth of 16 byte strings.
132-
let string16 = String(repeating: "X", count: 1 << 4)
132+
let string16 = String(repeating: Character("X"), count: 1 << 4)
133133

134134
measure {
135135
for _ in 0..<10 {
@@ -144,7 +144,7 @@ class OutputByteStreamPerfTests: XCTestCase {
144144

145145
func test1MBOf1KByteStrings_X100() {
146146
// Test writing 1MB worth of 1K byte strings.
147-
let bytes1k = String(repeating: "X", count: 1 << 10)
147+
let bytes1k = String(repeating: Character("X"), count: 1 << 10)
148148

149149
measure {
150150
for _ in 0..<100 {
@@ -159,7 +159,7 @@ class OutputByteStreamPerfTests: XCTestCase {
159159

160160
func test1MBOfJSONEncoded16ByteStrings_X10() {
161161
// Test writing 1MB worth of JSON encoded 16 byte strings.
162-
let string16 = String(repeating: "X", count: 1 << 4)
162+
let string16 = String(repeating: Character("X"), count: 1 << 4)
163163

164164
measure {
165165
for _ in 0..<10 {

Tests/POSIX/ReaddirTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ReaddirTests: XCTestCase {
4646
}
4747
}
4848
s.d_namlen = UInt16(n)
49-
XCTAssertEqual(s.name, String(repeating: "A", count: n))
49+
XCTAssertEqual(s.name, String(repeating: Character("A"), count: n))
5050
}
5151
}
5252

0 commit comments

Comments
 (0)