TestNoDuplicatePromptNames ensures all prompts have unique names
(t *testing.T)
| 147 | |
| 148 | // TestNoDuplicatePromptNames ensures all prompts have unique names |
| 149 | func TestNoDuplicatePromptNames(t *testing.T) { |
| 150 | prompts := AllPrompts(stubTranslation) |
| 151 | seen := make(map[string]bool) |
| 152 | |
| 153 | for _, prompt := range prompts { |
| 154 | name := prompt.Prompt.Name |
| 155 | assert.False(t, seen[name], |
| 156 | "Duplicate prompt name found: %q", name) |
| 157 | seen[name] = true |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | // TestAllToolsHaveHandlerFunc ensures all tools have a handler function |
| 162 | func TestAllToolsHaveHandlerFunc(t *testing.T) { |
nothing calls this directly
no test coverage detected