From e883fc9ea51e76dc9ed13fd4a92b0ee258a1e8c9 Mon Sep 17 00:00:00 2001 From: stephencelis Date: Thu, 1 Aug 2024 22:14:36 +0000 Subject: [PATCH] Run swift-format --- Sources/SnapshotTesting/AssertSnapshot.swift | 5 ++--- Sources/SnapshotTesting/Internal/RecordIssue.swift | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Sources/SnapshotTesting/AssertSnapshot.swift b/Sources/SnapshotTesting/AssertSnapshot.swift index 7aa1113d9..f7bb12397 100644 --- a/Sources/SnapshotTesting/AssertSnapshot.swift +++ b/Sources/SnapshotTesting/AssertSnapshot.swift @@ -311,10 +311,9 @@ public func verifySnapshot( func recordSnapshot() throws { try snapshotting.diffing.toData(diffable).write(to: snapshotFileUrl) #if !os(Linux) && !os(Windows) - if - !isSwiftTesting, + if !isSwiftTesting, ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS") - { + { XCTContext.runActivity(named: "Attached Recorded Snapshot") { activity in let attachment = XCTAttachment(contentsOfFile: snapshotFileUrl) activity.add(attachment) diff --git a/Sources/SnapshotTesting/Internal/RecordIssue.swift b/Sources/SnapshotTesting/Internal/RecordIssue.swift index a6953291f..214761180 100644 --- a/Sources/SnapshotTesting/Internal/RecordIssue.swift +++ b/Sources/SnapshotTesting/Internal/RecordIssue.swift @@ -5,10 +5,10 @@ import XCTest #endif var isSwiftTesting: Bool { -#if canImport(Testing) - return Test.current != nil + #if canImport(Testing) + return Test.current != nil #else - return false + return false #endif }