(t *testing.T)
| 168 | } |
| 169 | |
| 170 | func TestSimpleTokenCounter_ModelName(t *testing.T) { |
| 171 | tests := []struct { |
| 172 | name string |
| 173 | counter *SimpleTokenCounter |
| 174 | want string |
| 175 | }{ |
| 176 | { |
| 177 | name: "gpt-4", |
| 178 | counter: NewGPT4Counter(), |
| 179 | want: "gpt-4", |
| 180 | }, |
| 181 | { |
| 182 | name: "claude", |
| 183 | counter: NewClaudeCounter(), |
| 184 | want: "claude-sonnet-4-5", |
| 185 | }, |
| 186 | { |
| 187 | name: "custom", |
| 188 | counter: NewSimpleTokenCounter(DefaultConfig), |
| 189 | want: "default", |
| 190 | }, |
| 191 | } |
| 192 | |
| 193 | for _, tt := range tests { |
| 194 | t.Run(tt.name, func(t *testing.T) { |
| 195 | if got := tt.counter.ModelName(); got != tt.want { |
| 196 | t.Errorf("ModelName() = %v, want %v", got, tt.want) |
| 197 | } |
| 198 | }) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | func TestDetailedTokenCounter_EstimateMessagesDetailed(t *testing.T) { |
| 203 | baseCounter := NewGPT4Counter() |
nothing calls this directly
no test coverage detected