Files
zhaoyupeng.elqbandTRAE CLI 81deca8c8e feat: initialize Eino examples and ADK applications
Include chat, weather, image, travel, streaming ASR and text examples,
shared model initialization, documentation, and existing tests.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-11-19 11:08:03 +08:00

20 lines
479 B
Go

package tool
import (
"context"
"testing"
)
func TestImageArguments(t *testing.T) {
image := NewImage(nil)
for _, arguments := range []string{`{`, `{}`, `{"prompt":" "}`} {
if _, err := image.InvokableRun(context.Background(), arguments); err == nil {
t.Fatalf("应拒绝无效参数: %s", arguments)
}
}
info, err := image.Info(context.Background())
if err != nil || info.Name != "generate_image" {
t.Fatalf("工具定义 = %+v,错误 = %v", info, err)
}
}