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

Source from the content-addressed store, hash-verified

1113
1114 #[test]
1115 fn test_phase_timing_entry_roundtrip() {
1116 let original = sample_phase_timing_entry();
1117 let bytes = original.to_bytes();
1118 let recovered = PhaseTimingEntry::from_bytes(&bytes).unwrap();
1119
1120 assert_eq!(original, recovered);
1121 assert_eq!(recovered.phase, "implement");
1122 assert_eq!(recovered.input_tokens, 8200);
1123 assert_eq!(recovered.output_tokens, 3100);
1124 assert!((recovered.cost_usd - 0.0281).abs() < f64::EPSILON);
1125 }
1126
1127 #[test]
1128 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