Tests: enable compile verification on five previously-skipped mock tests#276
Merged
Tests: enable compile verification on five previously-skipped mock tests#276
Conversation
The five FIXMEs tracked bugs that later PRs fixed — the generator now produces output that actually compiles for these shapes: - mockOnly coerced to fulfilled slot type (fixed in #251) - @escaping applied to @sendable closure parameters on mock() (fixed in #267) - fully-lazy instantiation cycles no longer produce self-referential SafeDIMockConfiguration defaults (fixed by the global feedback-arc set in #259) - customMock returning a different type from Self — both the root-level call site and the type's own generated mock() now agree on the customMock return type (fixed in #266) Removing the `skipCompileVerification: true` flag on each confirms the fixes hold end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 41 41
Lines 6796 6796
=========================================
Hits 6796 6796 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five mock-generation tests carried
skipCompileVerification: trueFIXMEs pointing at generator bugs that have since been fixed. Removing the opt-outs confirms the fixes hold end-to-end (fresh parse → generated code → actual swiftc typecheck).Changes
Removed the FIXME comments and
skipCompileVerification: trueflag on:mock_usesMockOnly_whenProductionHasNoMockAndBothFulfillSameAdditionalTypemock_sendableClosureDependencyProducesValidIdentifier@escapingdropped on@Sendableclosure on mock()mock_generatedForFullyLazyInstantiationCycleSafeDIMockConfigurationdefaultsmock_extensionUserMockReturningAdditionalTypeUsedForProtocolPropertymock()mock_extensionUserMockReturningAdditionalTypeNotUsedForConcretePropertyTest plan
swift test --traits sourceBuild— 901 tests pass (up from 901; no tests added, but all five now exercise the compile-verification path)./CLI/lint.sh🤖 Generated with Claude Code