-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
good first issueGood for newcomersGood for newcomerstest-gapMissing test coverageMissing test coverage
Description
Problem
In DestinationCollisionResolverTests, the if case let .copyPackFile(_, destination, _) pattern-match blocks silently succeed if the install action is not .copyPackFile. If the resolver erroneously changed a component's install action type, the assertion would never execute and the test would pass.
Example
// Current — silently passes if installAction is not .copyPackFile
if case let .copyPackFile(_, destination, _) = result[0].components[0].installAction {
#expect(destination == "lint.sh")
}
// Improved — fails explicitly
if case let .copyPackFile(_, destination, _) = result[0].components[0].installAction {
#expect(destination == "lint.sh")
} else {
Issue.record("Expected .copyPackFile action")
}This pattern is already used in ExternalPackAdapterTests.swift (lines 162-164).
Scope
All 7 test methods in DestinationCollisionResolverTests.swift use this pattern — each needs the else { Issue.record(...) } clause added.
References
Tests/MCSTests/DestinationCollisionResolverTests.swiftTests/MCSTests/ExternalPackAdapterTests.swift— existing pattern to follow
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerstest-gapMissing test coverageMissing test coverage