@@ -370,14 +370,15 @@ public func verifySnapshot<Value, Format>(
370370 activity. add ( attachment)
371371 } else {
372372 // Snapshot was not written to disk. Create attachment from data and path extension
373- let typeIdentifier = snapshotting. pathExtension. flatMap ( uniformTypeIdentifier ( fromExtension: ) )
374-
373+ let typeIdentifier = snapshotting. pathExtension. flatMap (
374+ uniformTypeIdentifier ( fromExtension: ) )
375+
375376 let attachment = XCTAttachment (
376377 uniformTypeIdentifier: typeIdentifier,
377378 name: snapshotFileUrl. lastPathComponent,
378379 payload: snapshotData
379380 )
380-
381+
381382 activity. add ( attachment)
382383 }
383384 }
@@ -402,18 +403,18 @@ public func verifySnapshot<Value, Format>(
402403 try recordSnapshot ( writeToDisk: false )
403404
404405 return """
405- No reference was found on disk. New snapshot was not recorded because recording is disabled
406- """
406+ No reference was found on disk. New snapshot was not recorded because recording is disabled
407+ """
407408 } else {
408409 try recordSnapshot ( writeToDisk: true )
409410
410411 return """
411- No reference was found on disk. Automatically recorded snapshot: …
412+ No reference was found on disk. Automatically recorded snapshot: …
412413
413- open " \( snapshotFileUrl. absoluteString) "
414+ open " \( snapshotFileUrl. absoluteString) "
414415
415- Re-run " \( testName) " to assert against the newly-recorded snapshot.
416- """
416+ Re-run " \( testName) " to assert against the newly-recorded snapshot.
417+ """
417418 }
418419 }
419420
@@ -501,16 +502,16 @@ func sanitizePathComponent(_ string: String) -> String {
501502}
502503
503504#if !os(Linux) && !os(Windows)
504- func uniformTypeIdentifier( fromExtension pathExtension: String ) -> String ? {
505- // This can be much cleaner in macOS 11+ using UTType
506- let unmanagedString = UTTypeCreatePreferredIdentifierForTag (
507- kUTTagClassFilenameExtension as CFString ,
508- pathExtension as CFString ,
509- nil
510- )
505+ func uniformTypeIdentifier( fromExtension pathExtension: String ) -> String ? {
506+ // This can be much cleaner in macOS 11+ using UTType
507+ let unmanagedString = UTTypeCreatePreferredIdentifierForTag (
508+ kUTTagClassFilenameExtension as CFString ,
509+ pathExtension as CFString ,
510+ nil
511+ )
511512
512- return unmanagedString? . takeRetainedValue ( ) as String ?
513- }
513+ return unmanagedString? . takeRetainedValue ( ) as String ?
514+ }
514515#endif
515516
516517// We need to clean counter between tests executions in order to support test-iterations.
0 commit comments