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

Function test_attach_and_extract

atomic-agent/src/transcript/tests.rs:521–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

519
520#[test]
521fn test_attach_and_extract() {
522 let mut change = make_empty_change();
523 let data = UnhashedTurnData::new("s1", 2, "jsonl", vec![], &[]);
524
525 attach_unhashed(&mut change, &data).unwrap();
526 assert!(has_unhashed(&change));
527
528 let extracted = extract_unhashed(&change).unwrap();
529 assert_eq!(extracted.session_id, "s1");
530 assert_eq!(extracted.turn_number, 2);
531}
532
533#[test]
534fn test_extract_no_unhashed() {

Callers

nothing calls this directly

Calls 4

make_empty_changeFunction · 0.85
attach_unhashedFunction · 0.85
extract_unhashedFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected