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

Function test_model_usage_display

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

Source from the content-addressed store, hash-verified

1371
1372 #[test]
1373 fn test_model_usage_display() {
1374 let m = ModelUsage::new("claude-sonnet-4-5")
1375 .with_input(176)
1376 .with_output(8400)
1377 .with_cache_read(526_900)
1378 .with_cost(0.56);
1379
1380 let display = format!("{}", m);
1381 assert!(display.contains("claude-sonnet-4-5"));
1382 assert!(display.contains("input"));
1383 assert!(display.contains("output"));
1384 assert!(display.contains("cache read"));
1385 assert!(display.contains("$0.56"));
1386 }
1387
1388 #[test]
1389 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