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

Function test_intent_entry_roundtrip

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

Source from the content-addressed store, hash-verified

1086
1087 #[test]
1088 fn test_intent_entry_roundtrip() {
1089 let original = sample_intent_entry();
1090 let bytes = original.to_bytes();
1091 let recovered = IntentEntry::from_bytes(&bytes).unwrap();
1092
1093 assert_eq!(original, recovered);
1094 assert_eq!(recovered.title, "Fix authentication bug");
1095 assert_eq!(recovered.turn_id, 3);
1096 assert_eq!(recovered.total_tokens, 15420);
1097 assert!((recovered.total_cost_usd - 0.0462).abs() < f64::EPSILON);
1098 }
1099
1100 #[test]
1101 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