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:610–620  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

608
609 #[test]
610 fn test_phase_timing_entry_roundtrip() {
611 let original = sample_phase_timing_entry();
612 let bytes = original.to_bytes();
613 let recovered = PhaseTimingEntry::from_bytes(&bytes).unwrap();
614
615 assert_eq!(original, recovered);
616 assert_eq!(recovered.phase, "implement");
617 assert_eq!(recovered.input_tokens, 8200);
618 assert_eq!(recovered.output_tokens, 3100);
619 assert!((recovered.cost_usd - 0.0281).abs() < f64::EPSILON);
620 }
621
622 #[test]
623 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