Skip to content

Commit b1d34e0

Browse files
stephencelisactions-user
authored andcommitted
Run swift-format
1 parent 825ea07 commit b1d34e0

File tree

2 files changed

+83
-84
lines changed

2 files changed

+83
-84
lines changed
Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
#if canImport(CoreImage)
2-
import CoreImage
2+
import CoreImage
33

4-
@available(watchOS, unavailable)
5-
extension CIQRCodeDescriptor.ErrorCorrectionLevel: CustomDumpStringConvertible {
4+
@available(watchOS, unavailable)
5+
extension CIQRCodeDescriptor.ErrorCorrectionLevel: CustomDumpStringConvertible {
66
public var customDumpDescription: String {
7-
switch self {
8-
case .levelL:
9-
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelL"
10-
case .levelM:
11-
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelM"
12-
case .levelQ:
13-
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelQ"
14-
case .levelH:
15-
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelH"
16-
@unknown default:
17-
return "CIQRCodeDescriptor.ErrorCorrectionLevel.(@unknown default, rawValue: \(self.rawValue))"
18-
}
7+
switch self {
8+
case .levelL:
9+
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelL"
10+
case .levelM:
11+
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelM"
12+
case .levelQ:
13+
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelQ"
14+
case .levelH:
15+
return "CIQRCodeDescriptor.ErrorCorrectionLevel.levelH"
16+
@unknown default:
17+
return
18+
"CIQRCodeDescriptor.ErrorCorrectionLevel.(@unknown default, rawValue: \(self.rawValue))"
19+
}
1920
}
20-
}
21+
}
2122

22-
23-
extension CIDataMatrixCodeDescriptor.ECCVersion: CustomDumpStringConvertible {
23+
extension CIDataMatrixCodeDescriptor.ECCVersion: CustomDumpStringConvertible {
2424
public var customDumpDescription: String {
25-
switch self {
26-
27-
case .v000:
28-
return "CIDataMatrixCodeDescriptor.ECCVersion.v000"
29-
case .v050:
30-
return "CIDataMatrixCodeDescriptor.ECCVersion.v050"
31-
case .v080:
32-
return "CIDataMatrixCodeDescriptor.ECCVersion.v080"
33-
case .v100:
34-
return "CIDataMatrixCodeDescriptor.ECCVersion.v100"
35-
case .v140:
36-
return "CIDataMatrixCodeDescriptor.ECCVersion.v140"
37-
case .v200:
38-
return "CIDataMatrixCodeDescriptor.ECCVersion.v200"
39-
@unknown default:
40-
return "CIDataMatrixCodeDescriptor.ECCVersion.(@unknown default, rawValue: \(self.rawValue))"
41-
}
42-
}
43-
}
25+
switch self {
4426

27+
case .v000:
28+
return "CIDataMatrixCodeDescriptor.ECCVersion.v000"
29+
case .v050:
30+
return "CIDataMatrixCodeDescriptor.ECCVersion.v050"
31+
case .v080:
32+
return "CIDataMatrixCodeDescriptor.ECCVersion.v080"
33+
case .v100:
34+
return "CIDataMatrixCodeDescriptor.ECCVersion.v100"
35+
case .v140:
36+
return "CIDataMatrixCodeDescriptor.ECCVersion.v140"
37+
case .v200:
38+
return "CIDataMatrixCodeDescriptor.ECCVersion.v200"
39+
@unknown default:
40+
return
41+
"CIDataMatrixCodeDescriptor.ECCVersion.(@unknown default, rawValue: \(self.rawValue))"
42+
}
43+
}
44+
}
4545

46-
extension CIRenderDestinationAlphaMode: CustomDumpStringConvertible {
46+
extension CIRenderDestinationAlphaMode: CustomDumpStringConvertible {
4747
public var customDumpDescription: String {
48-
switch self {
49-
case .none:
50-
return "CIRenderDestinationAlphaMode.none"
51-
case .premultiplied:
52-
return "CIRenderDestinationAlphaMode.premultiplied"
53-
case .unpremultiplied:
54-
return "CIRenderDestinationAlphaMode.unpremultiplied"
55-
@unknown default:
56-
return "CIRenderDestinationAlphaMode.(@unknown default, rawValue: \(self.rawValue)"
57-
}
48+
switch self {
49+
case .none:
50+
return "CIRenderDestinationAlphaMode.none"
51+
case .premultiplied:
52+
return "CIRenderDestinationAlphaMode.premultiplied"
53+
case .unpremultiplied:
54+
return "CIRenderDestinationAlphaMode.unpremultiplied"
55+
@unknown default:
56+
return "CIRenderDestinationAlphaMode.(@unknown default, rawValue: \(self.rawValue)"
57+
}
5858
}
59-
}
59+
}
6060

6161
#endif
Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
11
#if canImport(CoreImage)
2-
import CoreImage
3-
import CustomDump
4-
import XCTest
2+
import CoreImage
3+
import CustomDump
4+
import XCTest
55

6-
7-
final class CoreImageTests: XCTestCase {
6+
final class CoreImageTests: XCTestCase {
87
func testCIQRCodeDescriptor() {
9-
var dump = ""
10-
customDump(
11-
[.levelH, .levelL, .levelM, .levelQ] as [CIQRCodeDescriptor.ErrorCorrectionLevel],
12-
to: &dump
13-
)
14-
15-
XCTAssertEqual(
16-
dump,
17-
"""
18-
[
19-
[0]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelH,
20-
[1]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelL,
21-
[2]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelM,
22-
[3]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelQ
23-
]
24-
"""
25-
)
26-
27-
dump = ""
28-
customDump(
29-
CIQRCodeDescriptor.ErrorCorrectionLevel.levelH,
30-
to: &dump
31-
)
32-
XCTAssertEqual(
33-
dump,
34-
"""
35-
CIQRCodeDescriptor.ErrorCorrectionLevel.levelH
36-
"""
37-
)
8+
var dump = ""
9+
customDump(
10+
[.levelH, .levelL, .levelM, .levelQ] as [CIQRCodeDescriptor.ErrorCorrectionLevel],
11+
to: &dump
12+
)
13+
14+
XCTAssertEqual(
15+
dump,
16+
"""
17+
[
18+
[0]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelH,
19+
[1]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelL,
20+
[2]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelM,
21+
[3]: CIQRCodeDescriptor.ErrorCorrectionLevel.levelQ
22+
]
23+
"""
24+
)
25+
26+
dump = ""
27+
customDump(
28+
CIQRCodeDescriptor.ErrorCorrectionLevel.levelH,
29+
to: &dump
30+
)
31+
XCTAssertEqual(
32+
dump,
33+
"""
34+
CIQRCodeDescriptor.ErrorCorrectionLevel.levelH
35+
"""
36+
)
3837
}
39-
}
38+
}
4039
#endif

0 commit comments

Comments
 (0)