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

Function test_phase_timing_entry_roundtrip

atomic-core/src/change/session.rs:371–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369
370 #[test]
371 fn test_phase_timing_entry_roundtrip() {
372 let original = sample_phase_timing_entry();
373 let bytes = original.to_bytes();
374 let recovered = PhaseTimingEntry::from_bytes(&bytes).unwrap();
375
376 assert_eq!(original, recovered);
377 assert_eq!(recovered.phase, "implement");
378 assert_eq!(recovered.input_tokens, 8200);
379 assert_eq!(recovered.output_tokens, 3100);
380 assert!((recovered.cost_usd - 0.0281).abs() < f64::EPSILON);
381 }
382
383 #[test]
384 fn test_session_event_roundtrip() {

Callers

nothing calls this directly

Calls 3

to_bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected