Skip to content

Commit efd04e9

Browse files
ceyhuntkremenek
authored andcommitted
[test] Replaced some if true {} statements with do {} (#2117)
1 parent a04dded commit efd04e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/Interpreter/SDK/CALayer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class FooLayer: CALayer {
4040
}
4141
}
4242

43-
if true {
43+
do {
4444
let layer = FooLayer()
4545
print("\(layer)")
4646
}

test/Interpreter/SDK/CoreGraphics_CGFloat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ CGFloatTestSuite.test("arithmetic") {
102102
}
103103

104104
CGFloatTestSuite.test("striding") {
105-
if true {
105+
do {
106106
var result = [CGFloat]()
107107
for f in stride(from: (1.0 as CGFloat), to: 2.0, by: 0.5) {
108108
result.append(f)
109109
}
110110
expectEqual([ 1.0, 1.5 ], result)
111111
}
112112

113-
if true {
113+
do {
114114
var result = [CGFloat]()
115115
for f in stride(from: (1.0 as CGFloat), through: 2.0, by: 0.5) {
116116
result.append(f)
@@ -121,7 +121,7 @@ CGFloatTestSuite.test("striding") {
121121

122122
CGFloatTestSuite.test("bridging") {
123123
// Bridging to NSNumber.
124-
if true {
124+
do {
125125
let flt: CGFloat = 4.125
126126

127127
// CGFloat -> NSNumber conversion.
@@ -134,7 +134,7 @@ CGFloatTestSuite.test("bridging") {
134134
}
135135

136136
// Array bridging.
137-
if true {
137+
do {
138138
let originalArray: [CGFloat] = [ 4.125, 10.625 ]
139139

140140
// Array -> NSArray

0 commit comments

Comments
 (0)