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

Function test_intent_entry_roundtrip

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

Source from the content-addressed store, hash-verified

581
582 #[test]
583 fn test_intent_entry_roundtrip() {
584 let original = sample_intent_entry();
585 let bytes = original.to_bytes();
586 let recovered = IntentEntry::from_bytes(&bytes).unwrap();
587
588 assert_eq!(original, recovered);
589 assert_eq!(recovered.title, "Fix authentication bug");
590 assert_eq!(recovered.turn_id, 3);
591 assert_eq!(recovered.total_tokens, 15420);
592 assert!((recovered.total_cost_usd - 0.0462).abs() < f64::EPSILON);
593 }
594
595 #[test]
596 fn test_todo_snapshot_roundtrip() {

Callers

nothing calls this directly

Calls 3

sample_intent_entryFunction · 0.85
to_bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected