test(m9): complete migration of stateful and async suites to XCTest (Slice 3) #107

Merged
gronod merged 1 commits from feat/m9-slice3-xctest-async-stateful into milestone/m9-monterey 2026-09-11 21:34:17 +01:00
Owner

Slice 3 (Phase 1b) of the M9 retarget: completes the Swift Testing → XCTest migration for every remaining suite.

Converted files (18)

  • ProcessManagerTests.swift — ProcessManagerTests suite (was .serialized; XCTest runs methods serially by default). All await #expect(throws:) sites now use the shared assertAsyncThrows(expectedType:errorHandler:) helper, preserving exact ProcessError equality checks. Issue.recordXCTFail. All test-site Task.sleep(for:)Task.sleep(nanoseconds:) with identical millisecond timings (10 ms polls, 20 ms flush retry, 500 ms / 2500 ms watchdog grace windows, collect timeout scaled to ns).
  • TargenTests.swift — ArgyllRunnerTargenTests (pure TargenArgsTests was converted in Slice 2).
  • PrinttargTests.swift — ArgyllRunnerPrinttargTests.
  • ArgyllRunnerColprofTests.swift, ArgyllRunnerCalibrationTests.swift, ArgyllRunnerStreamingLoopTests.swift — runner suites; parameterized toolFailed description matrix unrolled into a loop.
  • Stateful / store suites: CalibrationStoreTests, JSONFileStoreTests, SettingsTests (AppSettings + SettingsStore + LogSink), PresetTests (incl. all five parameterized matrices unrolled into loops), VerificationHistoryStoreTests, WizardGatingTests (+ WizardStateStore), ProfileInstallerTests.
  • App-target-gated suites (import ICCery; still blocked on Slice 4's @Observable demotion but converted and parse-clean): ProcessRunSupportTests, WizardCalibrationSessionTests, PresetViewModelMappingTests, TargetWorkflowViewModelTests, PrintPanelTests.

Mappings

@Suitefinal class …: XCTestCase; @Testfunc test…; #expectXCTAssert* equivalents; #requiretry XCTUnwrap; await #expect(throws:)await assertAsyncThrows(expectedType:) (with errorHandler equality checks where the original pinned a specific error value); sync #expect(throws:)XCTAssertThrowsError.

Verification

  • git grep "import Testing" → zero occurrences anywhere in the repo.
  • All 13 ICCeryCore-only converted files typecheck against the built ICCeryCore module at -target arm64-apple-macos12.0 -swift-version 5 (LogHolder dependency satisfied by joint typecheck of ArgyllRunnerColprofTests + ArgyllRunnerStreamingLoopTests).
  • The 5 app-importing files pass swiftc -parse (full typecheck gated by Slice 4, per megaplan).
  • xcodegen generate --spec project.yml regenerated cleanly; git status --porcelain shows only Tests/ modifications. docs/megaplans/ untouched.
  • Full xcodebuild test remains blocked until Slice 4 migrates @Observable in the app target.

Assignee: gronod

Slice 3 (Phase 1b) of the M9 retarget: completes the Swift Testing → XCTest migration for every remaining suite. ## Converted files (18) - ProcessManagerTests.swift — `ProcessManagerTests` suite (was `.serialized`; XCTest runs methods serially by default). All `await #expect(throws:)` sites now use the shared `assertAsyncThrows(expectedType:errorHandler:)` helper, preserving exact `ProcessError` equality checks. `Issue.record` → `XCTFail`. All test-site `Task.sleep(for:)` → `Task.sleep(nanoseconds:)` with identical millisecond timings (10 ms polls, 20 ms flush retry, 500 ms / 2500 ms watchdog grace windows, collect timeout scaled to ns). - TargenTests.swift — `ArgyllRunnerTargenTests` (pure `TargenArgsTests` was converted in Slice 2). - PrinttargTests.swift — `ArgyllRunnerPrinttargTests`. - ArgyllRunnerColprofTests.swift, ArgyllRunnerCalibrationTests.swift, ArgyllRunnerStreamingLoopTests.swift — runner suites; parameterized `toolFailed` description matrix unrolled into a loop. - Stateful / store suites: CalibrationStoreTests, JSONFileStoreTests, SettingsTests (AppSettings + SettingsStore + LogSink), PresetTests (incl. all five parameterized matrices unrolled into loops), VerificationHistoryStoreTests, WizardGatingTests (+ WizardStateStore), ProfileInstallerTests. - App-target-gated suites (import `ICCery`; still blocked on Slice 4's @Observable demotion but converted and parse-clean): ProcessRunSupportTests, WizardCalibrationSessionTests, PresetViewModelMappingTests, TargetWorkflowViewModelTests, PrintPanelTests. ## Mappings `@Suite` → `final class …: XCTestCase`; `@Test` → `func test…`; `#expect` → `XCTAssert*` equivalents; `#require` → `try XCTUnwrap`; `await #expect(throws:)` → `await assertAsyncThrows(expectedType:)` (with `errorHandler` equality checks where the original pinned a specific error value); sync `#expect(throws:)` → `XCTAssertThrowsError`. ## Verification - `git grep "import Testing"` → zero occurrences anywhere in the repo. - All 13 ICCeryCore-only converted files typecheck against the built ICCeryCore module at `-target arm64-apple-macos12.0 -swift-version 5` (LogHolder dependency satisfied by joint typecheck of ArgyllRunnerColprofTests + ArgyllRunnerStreamingLoopTests). - The 5 app-importing files pass `swiftc -parse` (full typecheck gated by Slice 4, per megaplan). - `xcodegen generate --spec project.yml` regenerated cleanly; `git status --porcelain` shows only Tests/ modifications. `docs/megaplans/` untouched. - Full `xcodebuild test` remains blocked until Slice 4 migrates @Observable in the app target. Assignee: gronod
gronod added 1 commit 2026-09-11 21:29:42 +01:00
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
gronod self-assigned this 2026-09-11 21:29:52 +01:00
gronod merged commit a76120d9f7 into milestone/m9-monterey 2026-09-11 21:34:17 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#107