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.swift
Tests/MCSTests/ExternalPackAdapterTests.swift — existing pattern to follow
Problem
In
DestinationCollisionResolverTests, theif 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
This pattern is already used in
ExternalPackAdapterTests.swift(lines 162-164).Scope
All 7 test methods in
DestinationCollisionResolverTests.swiftuse this pattern — each needs theelse { Issue.record(...) }clause added.References
Tests/MCSTests/DestinationCollisionResolverTests.swiftTests/MCSTests/ExternalPackAdapterTests.swift— existing pattern to follow