()
| 833 | |
| 834 | #[test] |
| 835 | fn test_model_usage_builder() { |
| 836 | let m = ModelUsage::new("claude-sonnet-4-5") |
| 837 | .with_input(176) |
| 838 | .with_output(8400) |
| 839 | .with_cache_read(526_900) |
| 840 | .with_cache_write(13_100) |
| 841 | .with_cost(0.56); |
| 842 | |
| 843 | assert_eq!(m.input_tokens, 176); |
| 844 | assert_eq!(m.output_tokens, 8400); |
| 845 | assert_eq!(m.cache_read_tokens, 526_900); |
| 846 | assert_eq!(m.cache_write_tokens, 13_100); |
| 847 | assert_eq!(m.cost_usd, 0.56); |
| 848 | assert_eq!(m.total_tokens(), 176 + 8400 + 526_900 + 13_100); |
| 849 | } |
| 850 | |
| 851 | #[test] |
| 852 | fn test_model_usage_display() { |
nothing calls this directly
no test coverage detected