Skip to content

Commit e607687

Browse files
committed
Compile for Android
1 parent 42a0861 commit e607687

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Sources/SnapshotTesting/AssertSnapshot.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public func verifySnapshot<Value, Format>(
354354

355355
func recordSnapshot() throws {
356356
try snapshotting.diffing.toData(diffable).write(to: snapshotFileUrl)
357-
#if !os(Linux) && !os(Windows)
357+
#if !os(Linux) && !os(Windows) && !os(Android)
358358
if !isSwiftTesting,
359359
ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS")
360360
{
@@ -418,7 +418,7 @@ public func verifySnapshot<Value, Format>(
418418
try snapshotting.diffing.toData(diffable).write(to: failedSnapshotFileUrl)
419419

420420
if !attachments.isEmpty {
421-
#if !os(Linux) && !os(Windows)
421+
#if !os(Linux) && !os(Windows) && !os(Android)
422422
if ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS"),
423423
!isSwiftTesting
424424
{

Sources/SnapshotTesting/Common/XCTAttachment.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if os(Linux) || os(Windows)
1+
#if os(Linux) || os(Windows) || os(Android)
22
import Foundation
33

44
public struct XCTAttachment {

Sources/SnapshotTesting/Internal/Deprecations.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public func _verifyInlineSnapshot<Value>(
136136

137137
/// Did not successfully record, so we will fail.
138138
if !attachments.isEmpty {
139-
#if !os(Linux) && !os(Windows)
139+
#if !os(Linux) && !os(Windows) && !os(Android)
140140
if ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS") {
141141
XCTContext.runActivity(named: "Attached Failure Diff") { activity in
142142
attachments.forEach {

0 commit comments

Comments
 (0)