Skip to content

Commit 42a0861

Browse files
mbrandonwgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent fb739f2 commit 42a0861

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

‎Sources/SnapshotTesting/AssertSnapshot.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,9 @@ public func verifySnapshot<Value, Format>(
419419

420420
if !attachments.isEmpty {
421421
#if !os(Linux) && !os(Windows)
422-
if
423-
ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS"),
422+
if ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS"),
424423
!isSwiftTesting
425-
{
424+
{
426425
XCTContext.runActivity(named: "Attached Failure Diff") { activity in
427426
attachments.forEach {
428427
activity.add($0)

‎Tests/InlineSnapshotTestingTests/AssertInlineSnapshotSwiftTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"""
2828
â–¿ 2 elements
2929
- "Hello"
30-
30+
3131
"""
3232
}
3333
} matching: { issue in
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
#if compiler(>=6) && canImport(Testing)
2-
import Testing
3-
import SnapshotTesting
2+
import Testing
3+
import SnapshotTesting
44

5-
@Suite(.snapshots(diffTool: "ksdiff"))
6-
struct SwiftTestingTests {
7-
@Test func testSnapshot() {
8-
assertSnapshot(of: ["Hello", "World"], as: .dump)
9-
}
5+
@Suite(.snapshots(diffTool: "ksdiff"))
6+
struct SwiftTestingTests {
7+
@Test func testSnapshot() {
8+
assertSnapshot(of: ["Hello", "World"], as: .dump)
9+
}
1010

11-
@Test func testSnapshotFailure() {
12-
withKnownIssue {
13-
assertSnapshot(of: ["Goodbye", "World"], as: .dump)
14-
} matching: { issue in
15-
issue.description.hasSuffix("""
16-
@@ −1,4 +1,4 @@
17-
 ▿ 2 elements
18-
− - "Hello"
19-
+ - "Goodbye"
20-
  - "World"
21-
""")
11+
@Test func testSnapshotFailure() {
12+
withKnownIssue {
13+
assertSnapshot(of: ["Goodbye", "World"], as: .dump)
14+
} matching: { issue in
15+
issue.description.hasSuffix(
16+
"""
17+
@@ −1,4 +1,4 @@
18+
 ▿ 2 elements
19+
− - "Hello"
20+
+ - "Goodbye"
21+
  - "World"
22+
""")
23+
}
2224
}
2325
}
24-
}
2526
#endif

0 commit comments

Comments
 (0)