From ef3a6f1d25c44b5a196d73b1b7ee3e3f1735c1bd Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Mon, 21 Oct 2024 15:32:06 +0900 Subject: [PATCH 1/4] Update CommitChecks.yml --- .github/workflows/CommitChecks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CommitChecks.yml b/.github/workflows/CommitChecks.yml index ce06c5b99c..e40ac29cf3 100644 --- a/.github/workflows/CommitChecks.yml +++ b/.github/workflows/CommitChecks.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: maxim-lobanov/setup-xcode@v1.1 with: - xcode-version: "15.4" + xcode-version: "16.0" - uses: actions/checkout@v2 - name: xcbeautify run: brew install xcbeautify From 5ed80deb55b01a2087eaea021b3c5a856bef051b Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Wed, 23 Oct 2024 12:00:47 +0900 Subject: [PATCH 2/4] Use pack iteration (#494) --- Sources/VergeComparator/PackedCompare.swift | 20 ++++--------------- Sources/VergeComparator/TypedComparator.swift | 7 ++++++- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Sources/VergeComparator/PackedCompare.swift b/Sources/VergeComparator/PackedCompare.swift index 5d2752bd27..799eb34c5c 100644 --- a/Sources/VergeComparator/PackedCompare.swift +++ b/Sources/VergeComparator/PackedCompare.swift @@ -1,23 +1,11 @@ @_spi(Internal) public func areEqual(_ lhs: (repeat each Element), _ rhs: (repeat each Element)) -> Bool { - - // https://github.com/apple/swift-evolution/blob/main/proposals/0408-pack-iteration.md - - func isEqual(_ left: T, _ right: T) throws { - if left == right { - return - } - - throw NotEqual() + + for (left, right) in repeat (each lhs, each rhs) { + guard left == right else { return false } } - - do { - repeat try isEqual(each lhs, each rhs) - } catch { - return false - } - return true + } diff --git a/Sources/VergeComparator/TypedComparator.swift b/Sources/VergeComparator/TypedComparator.swift index 288c13c4f8..60de9d6c49 100644 --- a/Sources/VergeComparator/TypedComparator.swift +++ b/Sources/VergeComparator/TypedComparator.swift @@ -42,7 +42,12 @@ extension TypedComparator { */ public static func equality() -> Self where Self == AnyEqualityComparator<(repeat each T)> { return .init { a, b in - areEqual((repeat each a), (repeat each b)) + + for (left, right) in repeat (each a, each b) { + guard left == right else { return false } + } + return true + } } From 0515011bddca26ca825a2416fc1f40d7c4e4917b Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Tue, 26 Nov 2024 16:48:25 +0900 Subject: [PATCH 3/4] Update CommitChecks.yml --- .github/workflows/CommitChecks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CommitChecks.yml b/.github/workflows/CommitChecks.yml index e40ac29cf3..be682d6bfb 100644 --- a/.github/workflows/CommitChecks.yml +++ b/.github/workflows/CommitChecks.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: maxim-lobanov/setup-xcode@v1.1 with: - xcode-version: "16.0" + xcode-version: "16.1" - uses: actions/checkout@v2 - name: xcbeautify run: brew install xcbeautify From e55c598f70716696d804cd1c648671c90d77fcd1 Mon Sep 17 00:00:00 2001 From: Muukii Date: Tue, 26 Nov 2024 23:58:35 +0900 Subject: [PATCH 4/4] Fix test --- Tests/VergeTests/StoreReaderTests.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Tests/VergeTests/StoreReaderTests.swift b/Tests/VergeTests/StoreReaderTests.swift index 783606b2aa..77f84ad25a 100644 --- a/Tests/VergeTests/StoreReaderTests.swift +++ b/Tests/VergeTests/StoreReaderTests.swift @@ -21,9 +21,6 @@ final class StoreReaderTests: XCTestCase { let inspect = try view.inspect() XCTAssertEqual(count, 0) - - // POC - XCTAssertEqual(try inspect.vStack()[0].text().string(), "Hello") XCTAssertEqual(try inspect.find(viewWithId: "count_1").text().string(), "0")