mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
test: PluginManager 接口含 ReloadOne 的编译期契约验证
This commit is contained in:
@ -2,6 +2,8 @@ package plugin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
sdk "gitcode.com/JianFeeeee/HomeAgent/internal/sdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestExtractDescription(t *testing.T) {
|
func TestExtractDescription(t *testing.T) {
|
||||||
@ -195,3 +197,8 @@ A tool with no parameters`
|
|||||||
t.Errorf("expected no params, got %d", len(props))
|
t.Errorf("expected no params, got %d", len(props))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestPluginManagerInterfaceReloadOne(t *testing.T) {
|
||||||
|
// 编译期契约:Registry 必须实现 PluginManager(含 ReloadOne 单插件重载)。
|
||||||
|
var _ sdk.PluginManager = (*Registry)(nil)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user