Skip to content

Commit 1fb2e65

Browse files
authored
Switch some let's to var's. (#189)
* Switch some let's to var's. * add xcodegen as a dependency
1 parent fd07b85 commit 1fb2e65

File tree

10 files changed

+637
-547
lines changed

10 files changed

+637
-547
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2
1+
4.2.1

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
xcodeproj:
2-
xcodegen && xed .
2+
swift run xcodegen
33

44
test-linux:
55
docker build --tag snapshot-testing . \

Package.resolved

Lines changed: 90 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ let package = Package(
1010
targets: ["SnapshotTesting"]),
1111
],
1212
dependencies: [
13+
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.2.0"),
1314
],
1415
targets: [
1516
.target(

SnapshotTesting.xcodeproj/project.pbxproj

Lines changed: 524 additions & 524 deletions
Large diffs are not rendered by default.

SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_iOS.xcscheme

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
buildForAnalyzing = "YES">
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "NT_E1FAA066576312BD4B5DB23882D1278B"
17+
BlueprintIdentifier = "64F17F6842573B100D61132C44E859BF"
1818
BuildableName = "SnapshotTesting.framework"
1919
BlueprintName = "SnapshotTesting_iOS"
2020
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -32,7 +32,7 @@
3232
skipped = "NO">
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
35-
BlueprintIdentifier = "NT_3F877242DE1996BA0322ABCB069FB3D9"
35+
BlueprintIdentifier = "6C1340F5ED556C5C9B3AE6579E6A859C"
3636
BuildableName = "SnapshotTestingTests.xctest"
3737
BlueprintName = "SnapshotTestingTests_iOS"
3838
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -42,7 +42,7 @@
4242
<MacroExpansion>
4343
<BuildableReference
4444
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "NT_E1FAA066576312BD4B5DB23882D1278B"
45+
BlueprintIdentifier = "64F17F6842573B100D61132C44E859BF"
4646
BuildableName = "SnapshotTesting.framework"
4747
BlueprintName = "SnapshotTesting_iOS"
4848
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -73,7 +73,7 @@
7373
<MacroExpansion>
7474
<BuildableReference
7575
BuildableIdentifier = "primary"
76-
BlueprintIdentifier = "NT_E1FAA066576312BD4B5DB23882D1278B"
76+
BlueprintIdentifier = "64F17F6842573B100D61132C44E859BF"
7777
BuildableName = "SnapshotTesting.framework"
7878
BlueprintName = "SnapshotTesting_iOS"
7979
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -101,7 +101,7 @@
101101
runnableDebuggingMode = "0">
102102
<BuildableReference
103103
BuildableIdentifier = "primary"
104-
BlueprintIdentifier = "NT_E1FAA066576312BD4B5DB23882D1278B"
104+
BlueprintIdentifier = "64F17F6842573B100D61132C44E859BF"
105105
BuildableName = "SnapshotTesting.framework"
106106
BlueprintName = "SnapshotTesting_iOS"
107107
ReferencedContainer = "container:SnapshotTesting.xcodeproj">

SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_macOS.xcscheme

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
buildForAnalyzing = "YES">
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "NT_EFB00F39C5351E0984C1B0E093A05904"
17+
BlueprintIdentifier = "0E84A93796E47328AAE7C80F4B484472"
1818
BuildableName = "SnapshotTesting.framework"
1919
BlueprintName = "SnapshotTesting_macOS"
2020
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -32,7 +32,7 @@
3232
skipped = "NO">
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
35-
BlueprintIdentifier = "NT_0640DAF50FBD76E0169F38B530ABB4E3"
35+
BlueprintIdentifier = "4D351C54668E3B5721A83752A850D9DE"
3636
BuildableName = "SnapshotTestingTests.xctest"
3737
BlueprintName = "SnapshotTestingTests_macOS"
3838
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -42,7 +42,7 @@
4242
<MacroExpansion>
4343
<BuildableReference
4444
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "NT_EFB00F39C5351E0984C1B0E093A05904"
45+
BlueprintIdentifier = "0E84A93796E47328AAE7C80F4B484472"
4646
BuildableName = "SnapshotTesting.framework"
4747
BlueprintName = "SnapshotTesting_macOS"
4848
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -73,7 +73,7 @@
7373
<MacroExpansion>
7474
<BuildableReference
7575
BuildableIdentifier = "primary"
76-
BlueprintIdentifier = "NT_EFB00F39C5351E0984C1B0E093A05904"
76+
BlueprintIdentifier = "0E84A93796E47328AAE7C80F4B484472"
7777
BuildableName = "SnapshotTesting.framework"
7878
BlueprintName = "SnapshotTesting_macOS"
7979
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -101,7 +101,7 @@
101101
runnableDebuggingMode = "0">
102102
<BuildableReference
103103
BuildableIdentifier = "primary"
104-
BlueprintIdentifier = "NT_EFB00F39C5351E0984C1B0E093A05904"
104+
BlueprintIdentifier = "0E84A93796E47328AAE7C80F4B484472"
105105
BuildableName = "SnapshotTesting.framework"
106106
BlueprintName = "SnapshotTesting_macOS"
107107
ReferencedContainer = "container:SnapshotTesting.xcodeproj">

SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_tvOS.xcscheme

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
buildForAnalyzing = "YES">
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "NT_693A6A5632B0A32E6E52A4DDD822E69E"
17+
BlueprintIdentifier = "CADC8264FEF9AEA34FCCD430697A1D65"
1818
BuildableName = "SnapshotTesting.framework"
1919
BlueprintName = "SnapshotTesting_tvOS"
2020
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -32,7 +32,7 @@
3232
skipped = "NO">
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
35-
BlueprintIdentifier = "NT_F155FA762896640C78950B0027F9917D"
35+
BlueprintIdentifier = "A6C32CCDA022766883A434A0E026CFA2"
3636
BuildableName = "SnapshotTestingTests.xctest"
3737
BlueprintName = "SnapshotTestingTests_tvOS"
3838
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -42,7 +42,7 @@
4242
<MacroExpansion>
4343
<BuildableReference
4444
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "NT_693A6A5632B0A32E6E52A4DDD822E69E"
45+
BlueprintIdentifier = "CADC8264FEF9AEA34FCCD430697A1D65"
4646
BuildableName = "SnapshotTesting.framework"
4747
BlueprintName = "SnapshotTesting_tvOS"
4848
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -73,7 +73,7 @@
7373
<MacroExpansion>
7474
<BuildableReference
7575
BuildableIdentifier = "primary"
76-
BlueprintIdentifier = "NT_693A6A5632B0A32E6E52A4DDD822E69E"
76+
BlueprintIdentifier = "CADC8264FEF9AEA34FCCD430697A1D65"
7777
BuildableName = "SnapshotTesting.framework"
7878
BlueprintName = "SnapshotTesting_tvOS"
7979
ReferencedContainer = "container:SnapshotTesting.xcodeproj">
@@ -101,7 +101,7 @@
101101
runnableDebuggingMode = "0">
102102
<BuildableReference
103103
BuildableIdentifier = "primary"
104-
BlueprintIdentifier = "NT_693A6A5632B0A32E6E52A4DDD822E69E"
104+
BlueprintIdentifier = "CADC8264FEF9AEA34FCCD430697A1D65"
105105
BuildableName = "SnapshotTesting.framework"
106106
BlueprintName = "SnapshotTesting_tvOS"
107107
ReferencedContainer = "container:SnapshotTesting.xcodeproj">

Sources/SnapshotTesting/Diffing.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import XCTest
44
/// The ability to compare `Value`s and convert them to and from `Data`.
55
public struct Diffing<Value> {
66
/// Converts a value _to_ data.
7-
public let toData: (Value) -> Data
7+
public var toData: (Value) -> Data
88

99
/// Produces a value _from_ data.
10-
public let fromData: (Data) -> Value
10+
public var fromData: (Data) -> Value
1111

1212
/// Compares two values. If the values do not match, returns a failure message and artifacts describing the failure.
13-
public let diff: (Value, Value) -> (String, [XCTAttachment])?
13+
public var diff: (Value, Value) -> (String, [XCTAttachment])?
1414

1515
/// Creates a new `Diffing` on `Value`.
1616
///

Sources/SnapshotTesting/Snapshotting.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ public struct Snapshotting<Value, Format> {
77
public var pathExtension: String?
88

99
/// How the snapshot format is diffed and converted to and from data.
10-
public let diffing: Diffing<Format>
10+
public var diffing: Diffing<Format>
1111

1212
/// How a value is transformed into a diffable snapshot format.
13-
public let snapshot: (Value) -> Async<Format>
13+
public var snapshot: (Value) -> Async<Format>
1414

1515
/// Creates a snapshot strategy.
1616
///

0 commit comments

Comments
 (0)