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

Function test_intent_entry_roundtrip

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

Source from the content-addressed store, hash-verified

342
343 #[test]
344 fn test_intent_entry_roundtrip() {
345 let original = sample_intent_entry();
346 let bytes = original.to_bytes();
347 let recovered = IntentEntry::from_bytes(&bytes).unwrap();
348
349 assert_eq!(original, recovered);
350 assert_eq!(recovered.title, "Fix authentication bug");
351 assert_eq!(recovered.turn_id, 3);
352 assert_eq!(recovered.total_tokens, 15420);
353 assert!((recovered.total_cost_usd - 0.0462).abs() < f64::EPSILON);
354 }
355
356 #[test]
357 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