(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func TestEditFileSchemaShape(t *testing.T) { |
| 220 | sch := EditFileSchema() |
| 221 | fn, ok := sch["function"].(map[string]any) |
| 222 | if !ok { |
| 223 | t.Fatal("missing function") |
| 224 | } |
| 225 | if fn["name"] != "edit_file" { |
| 226 | t.Fatalf("name wrong: %v", fn["name"]) |
| 227 | } |
| 228 | params, ok := fn["parameters"].(map[string]any) |
| 229 | if !ok { |
| 230 | t.Fatal("missing parameters") |
| 231 | } |
| 232 | props, ok := params["properties"].(map[string]any) |
| 233 | if !ok { |
| 234 | t.Fatal("missing properties") |
| 235 | } |
| 236 | for _, key := range []string{"path", "old_string", "new_string"} { |
| 237 | if _, ok := props[key]; !ok { |
| 238 | t.Fatalf("missing property %q", key) |
| 239 | } |
| 240 | } |
| 241 | } |
nothing calls this directly
no test coverage detected