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

Function test_todo_snapshot_roundtrip

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

Source from the content-addressed store, hash-verified

355
356 #[test]
357 fn test_todo_snapshot_roundtrip() {
358 let original = sample_todo_snapshot();
359 let bytes = original.to_bytes();
360 let recovered = TodoSnapshot::from_bytes(&bytes).unwrap();
361
362 assert_eq!(original, recovered);
363 assert_eq!(recovered.todo_id, "todo-001");
364 assert_eq!(recovered.file, Some("src/auth/token.rs".into()));
365 assert_eq!(recovered.start_line, Some(42));
366 assert_eq!(recovered.end_line, Some(87));
367 assert_eq!(recovered.completed_at, Some("2025-01-15T10:32:15Z".into()));
368 }
369
370 #[test]
371 fn test_phase_timing_entry_roundtrip() {

Callers

nothing calls this directly

Calls 3

sample_todo_snapshotFunction · 0.85
to_bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected