()
| 1354 | |
| 1355 | #[test] |
| 1356 | fn test_model_usage_builder() { |
| 1357 | let m = ModelUsage::new("claude-sonnet-4-5") |
| 1358 | .with_input(176) |
| 1359 | .with_output(8400) |
| 1360 | .with_cache_read(526_900) |
| 1361 | .with_cache_write(13_100) |
| 1362 | .with_cost(0.56); |
| 1363 | |
| 1364 | assert_eq!(m.input_tokens, 176); |
| 1365 | assert_eq!(m.output_tokens, 8400); |
| 1366 | assert_eq!(m.cache_read_tokens, 526_900); |
| 1367 | assert_eq!(m.cache_write_tokens, 13_100); |
| 1368 | assert_eq!(m.cost_usd, 0.56); |
| 1369 | assert_eq!(m.total_tokens(), 176 + 8400 + 526_900 + 13_100); |
| 1370 | } |
| 1371 | |
| 1372 | #[test] |
| 1373 | fn test_model_usage_display() { |
nothing calls this directly
no test coverage detected