MCPcopy Create free account
hub / github.com/astercloud/aster / TestNewWriteTool

Function TestNewWriteTool

pkg/tools/builtin/write_test.go:8–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestNewWriteTool(t *testing.T) {
9 tool, err := NewWriteTool(nil)
10 if err != nil {
11 t.Fatalf("Failed to create Write tool: %v", err)
12 }
13
14 if tool.Name() != "Write" {
15 t.Errorf("Expected tool name 'Write', got '%s'", tool.Name())
16 }
17
18 if tool.Description() == "" {
19 t.Error("Tool description should not be empty")
20 }
21}
22
23func TestWriteTool_CreateNewFile(t *testing.T) {
24 tool, err := NewWriteTool(nil)

Callers

nothing calls this directly

Calls 4

NameMethod · 0.95
DescriptionMethod · 0.95
NewWriteToolFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected