MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_model_usage_display

Function test_model_usage_display

atomic-core/src/change/attestation.rs:852–865  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

850
851 #[test]
852 fn test_model_usage_display() {
853 let m = ModelUsage::new("claude-sonnet-4-5")
854 .with_input(176)
855 .with_output(8400)
856 .with_cache_read(526_900)
857 .with_cost(0.56);
858
859 let display = format!("{}", m);
860 assert!(display.contains("claude-sonnet-4-5"));
861 assert!(display.contains("input"));
862 assert!(display.contains("output"));
863 assert!(display.contains("cache read"));
864 assert!(display.contains("$0.56"));
865 }
866
867 #[test]
868 fn test_model_usage_display_small_cost() {

Callers

nothing calls this directly

Calls 4

with_costMethod · 0.80
with_cache_readMethod · 0.80
with_outputMethod · 0.80
with_inputMethod · 0.80

Tested by

no test coverage detected