-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb739f2
commit 42a0861
Showing
3 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
""" | ||
â–¿ 2 elements | ||
- "Hello" | ||
""" | ||
} | ||
} matching: { issue in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
#if compiler(>=6) && canImport(Testing) | ||
import Testing | ||
import SnapshotTesting | ||
import Testing | ||
import SnapshotTesting | ||
|
||
@Suite(.snapshots(diffTool: "ksdiff")) | ||
struct SwiftTestingTests { | ||
@Test func testSnapshot() { | ||
assertSnapshot(of: ["Hello", "World"], as: .dump) | ||
} | ||
@Suite(.snapshots(diffTool: "ksdiff")) | ||
struct SwiftTestingTests { | ||
@Test func testSnapshot() { | ||
assertSnapshot(of: ["Hello", "World"], as: .dump) | ||
} | ||
|
||
@Test func testSnapshotFailure() { | ||
withKnownIssue { | ||
assertSnapshot(of: ["Goodbye", "World"], as: .dump) | ||
} matching: { issue in | ||
issue.description.hasSuffix(""" | ||
@@ −1,4 +1,4 @@ | ||
 ▿ 2 elements | ||
− - "Hello" | ||
+ - "Goodbye" | ||
  - "World" | ||
""") | ||
@Test func testSnapshotFailure() { | ||
withKnownIssue { | ||
assertSnapshot(of: ["Goodbye", "World"], as: .dump) | ||
} matching: { issue in | ||
issue.description.hasSuffix( | ||
""" | ||
@@ −1,4 +1,4 @@ | ||
 ▿ 2 elements | ||
− - "Hello" | ||
+ - "Goodbye" | ||
  - "World" | ||
""") | ||
} | ||
} | ||
} | ||
} | ||
#endif |