Delete functions that no product code calls, and fold "simple plus WithOptions" pairs into the one signature callers actually use. Rename the live macOS lifecycle functions that were labelled Legacy. The architecture tests now share one source loader and reject functions without a product caller and catalog messages nobody reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
715 B
Go
31 lines
715 B
Go
package archtest
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// externalDriverIDs are guest drivers that live in separate plugin
|
|
// repositories. The host reaches them only through the generic driver
|
|
// contract, so no host source file may name one.
|
|
var externalDriverIDs = []string{
|
|
"reims.driver.wsl",
|
|
"reims.driver.hyperv-linux",
|
|
"reims.driver.hyperv-windows",
|
|
"reims.driver.sandbox",
|
|
"reims.driver.avd",
|
|
}
|
|
|
|
func TestHostCodeNamesNoExternalDriver(t *testing.T) {
|
|
for _, s := range sources(t) {
|
|
if s.isTest() {
|
|
continue
|
|
}
|
|
for _, id := range externalDriverIDs {
|
|
if strings.Contains(s.raw, id) {
|
|
t.Errorf("%s names the external driver %q: host code must stay driver-agnostic", s.rel, id)
|
|
}
|
|
}
|
|
}
|
|
}
|