From 6b8d78b5e2cd117677ee72b4dc967d689a6555eb Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:04:33 -0700 Subject: [PATCH 1/9] Find-and-replace: Add `@testable import CounterApp` --- .../03-TestingYourFeatures/01-03-01-code-0001.swift | 2 ++ .../03-TestingYourFeatures/01-03-01-code-0002.swift | 2 ++ .../03-TestingYourFeatures/01-03-01-code-0004.swift | 2 ++ .../03-TestingYourFeatures/01-03-01-code-0005.swift | 2 ++ .../03-TestingYourFeatures/01-03-01-code-0006.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0001-previous.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0001.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0002.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0003.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0004.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0005.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0006.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0007.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0009.swift | 2 ++ .../03-TestingYourFeatures/01-03-02-code-0010.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0001-previous.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0001.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0002.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0003.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0004.swift | 2 ++ .../03-TestingYourFeatures/01-03-03-code-0005.swift | 2 ++ .../03-TestingYourFeatures/01-03-04-code-0006-previous.swift | 2 ++ .../03-TestingYourFeatures/01-03-04-code-0006.swift | 2 ++ .../03-TestingYourFeatures/01-03-04-code-0007.swift | 2 ++ .../03-TestingYourFeatures/01-03-04-code-0008.swift | 2 ++ 25 files changed, 50 insertions(+) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift index b4721bcbf6b4..4858e7650bb1 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0002.swift index db85c9907feb..82ffb2f873a2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0002.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift index 72a0503025d4..aaae29868a46 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift index 3f05ff2a9a14..af3d9b9d369f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0006.swift index 80ca4f525343..920014ef3dbc 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0006.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001-previous.swift index 149fca7b9b85..499c4597f7ff 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001-previous.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001.swift index f41c56736f9d..1c5254d1e343 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift index ca2bf3ae277d..1eed52f4fef2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift index 66d3dafbc30d..049f247c7312 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift index 5c171d2fbfe1..93a6b4014eb8 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift index 93cbee4aa38a..ff362b0b1a51 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift index 52bd865a03de..957ae50014f5 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift index afa02159753c..ad7d7357b312 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift index afa02159753c..ad7d7357b312 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift index 7753e7dae5ed..6aaf428a7532 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testTimer() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001-previous.swift index 149fca7b9b85..499c4597f7ff 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001-previous.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001.swift index 54ef55e88977..f6f311bba650 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0001.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift index f836e106bad2..933ebea549fd 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift index 01192ba3696e..be8605ac2e20 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift index c97837769eeb..700da67888d0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift index 8b815e08ca6d..da89c961bf3b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift index c97837769eeb..700da67888d0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift index 6261c982a630..dfe3ffd986d8 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift index 23155d922a53..280d88818901 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift index e7e771006097..8b2fab595e6d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class CounterFeatureTests: XCTestCase { func testNumberFact() async { From 5f89396eea45bf5282dfb5dd66d124aac6b74a3d Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:09:13 -0700 Subject: [PATCH 2/9] Typo Fix: "you" -> "your" --- .../03-TestingYourFeatures/01-03-TestingYourFeature.tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial index f6d12a73bb4d..2d89e9458d34 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial @@ -314,7 +314,7 @@ Now we see the problem with using uncontrolled dependencies in our feature code. It makes our code hard to test, and can make tests take a long time to run or become flakey. - For these reasons, and more, it is highly encouraged for you to control you dependency on + For these reasons, and more, it is highly encouraged for you to control your dependency on external systems (see for more information). The Composable Architecture comes with a complete set of tools for controlling and propagating dependencies throughout an application. From 2a072bcef1e6ab3ad775e56c5fcaa7fc14b5d873 Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:09:46 -0700 Subject: [PATCH 3/9] Typo fix: It's -> its --- .../04-ComposingFeatures/01-04-ComposingFeatures.tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-ComposingFeatures.tutorial b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-ComposingFeatures.tutorial index 49e69e35d68a..32ee69d8b3c9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-ComposingFeatures.tutorial +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-ComposingFeatures.tutorial @@ -95,7 +95,7 @@ and perform any state mutations necessary based on the action passed in. We still want to do that for the core logic of the app feature, but we also want compose in - the `CounterFeature` reducer so that it's logic can execute on the `tab1` and `tab2` state + the `CounterFeature` reducer so that its logic can execute on the `tab1` and `tab2` state without the `AppFeature` having to recreate it. @Code(name: "AppFeature.swift", file: 01-04-02-code-0003.swift) From 3be12a7da846f58490d4a1a2c7931376e87cbc94 Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:11:05 -0700 Subject: [PATCH 4/9] Typo: `CounterFeature` -> `ContactsFeature` --- .../03-TestingPresentation/02-03-TestingPresentation.tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-TestingPresentation.tutorial b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-TestingPresentation.tutorial index 4abf1647570e..d48b74198bef 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-TestingPresentation.tutorial +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-TestingPresentation.tutorial @@ -306,7 +306,7 @@ } @Step { - Make use of the new `deleteConfirmation` static alert function in the `CounterFeature` + Make use of the new `deleteConfirmation` static alert function in the `ContactsFeature` reducer, rather than building `AlertState` from scratch. @Code(name: "ContactsFeature.swift", file: 02-03-03-code-0007.swift, previousFile: 02-03-03-code-0007-previous.swift) From 79c5c3dcf02ee253fc30b4fb2fc1f05711706ce5 Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:13:34 -0700 Subject: [PATCH 5/9] Find-and-replace: Switch from deprecated `.navigationBarTitle()` to `navigationTitle()` --- .../02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift | 2 +- .../02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift | 2 +- .../04-NavigationStacks/02-04-03-code-0003-previous.swift | 2 +- .../02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift index 568e8152057e..d5d3620483d2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift @@ -6,6 +6,6 @@ struct ContactDetailView: View { var body: some View { Form { } - .navigationBarTitle(Text(store.contact.name)) + .navigationTitle(Text(store.contact.name)) } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift index 6c65434a761a..92e11942bc16 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift @@ -6,7 +6,7 @@ struct ContactDetailView: View { var body: some View { Form { } - .navigationBarTitle(Text(store.contact.name)) + .navigationTitle(Text(store.contact.name)) } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift index 6c65434a761a..92e11942bc16 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift @@ -6,7 +6,7 @@ struct ContactDetailView: View { var body: some View { Form { } - .navigationBarTitle(Text(store.contact.name)) + .navigationTitle(Text(store.contact.name)) } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift index 1e5acd8c2d84..a48bda7884cf 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift @@ -9,7 +9,7 @@ struct ContactDetailView: View { store.send(.deleteButtonTapped) } } - .navigationBarTitle(Text(store.contact.name)) + .navigationTitle(Text(store.contact.name)) .alert($store.scope(state: \.alert, action: \.alert)) } } From 017e2443f71063157f4cfb19b8431fed867702b6 Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:32:16 -0700 Subject: [PATCH 6/9] Typo: `using` -> `uses` --- .../03-TestingYourFeatures/01-03-TestingYourFeature.tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial index 2d89e9458d34..0077cdebd3ee 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-TestingYourFeature.tutorial @@ -57,7 +57,7 @@ > Note: The ``ComposableArchitecture/TestStore/send(_:assert:file:line:)-2co21`` method on the test store is async because most features involve asynchronous side effects, and the - test store using the async context to track those effects. + test store uses the async context to track those effects. @Code(name: "CounterFeatureTests.swift", file: 01-03-01-code-0004.swift, previousFile: file: 01-03-01-code-0002.swift) } From c1c0ad63ee9d4cf4323a0d58ab5065e75c61185f Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 11:47:14 -0700 Subject: [PATCH 7/9] Add `@testable import CounterApp` to the Composing Feature section --- .../01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift | 2 ++ .../01-Essentials/04-ComposingFeatures/01-04-02-code-0006.swift | 2 ++ .../01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift | 2 ++ .../01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift index 1f785a59916f..d587cae5eedf 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class AppFeatureTests: XCTestCase { func testIncrementInFirstTab() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0006.swift index 9d62757654c8..b8c132baff47 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0006.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class AppFeatureTests: XCTestCase { func testIncrementInFirstTab() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift index 326ec26acb14..25b26a62b65a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class AppFeatureTests: XCTestCase { func testIncrementInFirstTab() async { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift index d3b8805364dc..f0b279db59a4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift @@ -1,6 +1,8 @@ import ComposableArchitecture import XCTest +@testable import CounterApp + @MainActor final class AppFeatureTests: XCTestCase { func testIncrementInFirstTab() async { From 008f3a80a5aa2e8a32f4288502188e719791a18d Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 12:07:37 -0700 Subject: [PATCH 8/9] Typo: `closet` -> `closest` --- .../Documentation.docc/Articles/StackBasedNavigation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Articles/StackBasedNavigation.md b/Sources/ComposableArchitecture/Documentation.docc/Articles/StackBasedNavigation.md index 46ec9a262109..52a5a400ea2f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Articles/StackBasedNavigation.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Articles/StackBasedNavigation.md @@ -285,7 +285,7 @@ struct ChildView: View { } ``` -When `self.dismiss()` is invoked, SwiftUI finds the closet parent view that is presented in the +When `self.dismiss()` is invoked, SwiftUI finds the closest parent view that is presented in the navigation stack, and removes that state from the collection powering the stack. This can be incredibly useful, but it is also relegated to the view layer. It is not possible to use `dismiss` elsewhere, like in an observable object, which would allow you to have nuanced logic From 8001129c29b06206ea863ae843e813c0d615f32f Mon Sep 17 00:00:00 2001 From: David Furman Date: Fri, 19 Apr 2024 12:08:22 -0700 Subject: [PATCH 9/9] Remove mention of now-unused forward slash syntax for case paths --- .../Documentation.docc/Articles/TreeBasedNavigation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Articles/TreeBasedNavigation.md b/Sources/ComposableArchitecture/Documentation.docc/Articles/TreeBasedNavigation.md index b8e39159ff97..c5d296c43290 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Articles/TreeBasedNavigation.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Articles/TreeBasedNavigation.md @@ -87,7 +87,7 @@ struct InventoryFeature { > Note: The key path used with `ifLet` focuses on the `@PresentationState` projected value since it > uses the `$` syntax. Also note that the action uses a > [case path](http://github.com/pointfreeco/swift-case-paths), which is analogous to key paths but -> tuned for enums, and uses the forward slash syntax. +> tuned for enums. That's all that it takes to integrate the domains and logic of the parent and child features. Next we need to integrate the features' views. This is done by passing a binding of a store to one