@@ -287,68 +287,68 @@ final class InlineSnapshotTestingTests: XCTestCase {
287287 }
288288 }
289289
290- #if canImport(Darwin)
291- func testRecordFailed_IncorrectExpectation( ) throws {
292- let initialInlineSnapshotState = inlineSnapshotState
293- defer { inlineSnapshotState = initialInlineSnapshotState }
294-
295- XCTExpectFailure {
296- withSnapshotTesting ( record: . failed) {
297- assertInlineSnapshot ( of: 42 , as: . json) {
298- """
299- 4
300- """
290+ #if canImport(Darwin)
291+ func testRecordFailed_IncorrectExpectation( ) throws {
292+ let initialInlineSnapshotState = inlineSnapshotState
293+ defer { inlineSnapshotState = initialInlineSnapshotState }
294+
295+ XCTExpectFailure {
296+ withSnapshotTesting ( record: . failed) {
297+ assertInlineSnapshot ( of: 42 , as: . json) {
298+ """
299+ 4
300+ """
301+ }
301302 }
303+ } issueMatcher: {
304+ $0. compactDescription == """
305+ failed - Snapshot did not match. Difference: …
306+
307+ @@ −1,1 +1,1 @@
308+ −4
309+ +42
310+
311+ A new snapshot was automatically recorded.
312+ """
302313 }
303- } issueMatcher: {
304- $0. compactDescription == """
305- failed - Snapshot did not match. Difference: …
306-
307- @@ −1,1 +1,1 @@
308- −4
309- +42
310-
311- A new snapshot was automatically recorded.
312- """
313- }
314314
315- XCTAssertEqual ( inlineSnapshotState. count, 1 )
316- XCTAssertEqual (
317- String ( describing: inlineSnapshotState. keys. first!. path)
318- . hasSuffix ( " InlineSnapshotTestingTests.swift " ) ,
319- true
320- )
321- }
315+ XCTAssertEqual ( inlineSnapshotState. count, 1 )
316+ XCTAssertEqual (
317+ String ( describing: inlineSnapshotState. keys. first!. path)
318+ . hasSuffix ( " InlineSnapshotTestingTests.swift " ) ,
319+ true
320+ )
321+ }
322322 #endif
323323
324- #if canImport(Darwin)
325- func testRecordFailed_MissingExpectation( ) throws {
326- let initialInlineSnapshotState = inlineSnapshotState
327- defer { inlineSnapshotState = initialInlineSnapshotState }
324+ #if canImport(Darwin)
325+ func testRecordFailed_MissingExpectation( ) throws {
326+ let initialInlineSnapshotState = inlineSnapshotState
327+ defer { inlineSnapshotState = initialInlineSnapshotState }
328328
329- XCTExpectFailure {
330- withSnapshotTesting ( record: . failed) {
331- assertInlineSnapshot ( of: 42 , as: . json)
332- }
333- } issueMatcher: {
334- $0. compactDescription == """
335- failed - Automatically recorded a new snapshot. Difference: …
329+ XCTExpectFailure {
330+ withSnapshotTesting ( record: . failed) {
331+ assertInlineSnapshot ( of: 42 , as: . json)
332+ }
333+ } issueMatcher: {
334+ $0. compactDescription == """
335+ failed - Automatically recorded a new snapshot. Difference: …
336336
337- @@ −1,1 +1,1 @@
338- −
339- +42
337+ @@ −1,1 +1,1 @@
338+ −
339+ +42
340340
341- Re-run " testRecordFailed_MissingExpectation() " to assert against the newly-recorded snapshot.
342- """
343- }
341+ Re-run " testRecordFailed_MissingExpectation() " to assert against the newly-recorded snapshot.
342+ """
343+ }
344344
345- XCTAssertEqual ( inlineSnapshotState. count, 1 )
346- XCTAssertEqual (
347- String ( describing: inlineSnapshotState. keys. first!. path)
348- . hasSuffix ( " InlineSnapshotTestingTests.swift " ) ,
349- true
350- )
351- }
345+ XCTAssertEqual ( inlineSnapshotState. count, 1 )
346+ XCTAssertEqual (
347+ String ( describing: inlineSnapshotState. keys. first!. path)
348+ . hasSuffix ( " InlineSnapshotTestingTests.swift " ) ,
349+ true
350+ )
351+ }
352352 #endif
353353}
354354
0 commit comments