(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestToolSet_rejectsInvalidNames(t *testing.T) { |
| 54 | cases := []struct { |
| 55 | name string |
| 56 | fn func() |
| 57 | }{ |
| 58 | {"colon in builtin", func() { NewToolSet().AddBuiltIn("has:colon") }}, |
| 59 | {"space in mcp", func() { NewToolSet().AddMCP("has space") }}, |
| 60 | {"empty custom", func() { NewToolSet().AddCustom("") }}, |
| 61 | } |
| 62 | for _, c := range cases { |
| 63 | t.Run(c.name, func(t *testing.T) { |
| 64 | defer func() { |
| 65 | if r := recover(); r == nil { |
| 66 | t.Fatal("expected panic, got none") |
| 67 | } |
| 68 | }() |
| 69 | c.fn() |
| 70 | }) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | func TestBuiltInToolsIsolated_membership(t *testing.T) { |
| 75 | for _, banned := range []string{"bash", "edit", "grep", "web_fetch"} { |
nothing calls this directly
no test coverage detected
searching dependent graphs…