(t *testing.T)
| 252 | } |
| 253 | |
| 254 | func TestCursorUsageModelFallback(t *testing.T) { |
| 255 | t.Parallel() |
| 256 | |
| 257 | tests := []struct { |
| 258 | name string |
| 259 | evtModel string |
| 260 | configuredModel string |
| 261 | want string |
| 262 | }{ |
| 263 | {"event model wins", "gpt-5.3-codex", "composer-2.5", "gpt-5.3-codex"}, |
| 264 | {"configured model fallback", "", "composer-2.5", "composer-2.5"}, |
| 265 | {"default cursor", "", "", "cursor"}, |
| 266 | } |
| 267 | |
| 268 | for _, tc := range tests { |
| 269 | t.Run(tc.name, func(t *testing.T) { |
| 270 | got := cursorUsageModel(tc.evtModel, tc.configuredModel) |
| 271 | if got != tc.want { |
| 272 | t.Fatalf("cursorUsageModel(%q, %q) = %q, want %q", tc.evtModel, tc.configuredModel, got, tc.want) |
| 273 | } |
| 274 | }) |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | func TestCursorAccumulateResultUsageUsesConfiguredModel(t *testing.T) { |
| 279 | t.Parallel() |
nothing calls this directly
no test coverage detected