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

Function test_session_event_roundtrip

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

Source from the content-addressed store, hash-verified

382
383 #[test]
384 fn test_session_event_roundtrip() {
385 let original = sample_session_event();
386 let bytes = original.to_bytes();
387 let recovered = SessionEvent::from_bytes(&bytes).unwrap();
388
389 assert_eq!(original, recovered);
390 assert_eq!(recovered.seq, 7);
391 assert_eq!(recovered.event_kind, "fire");
392 assert_eq!(recovered.place, Some("ready".into()));
393 assert_eq!(recovered.transition, Some("plan_to_implement".into()));
394 assert_eq!(recovered.record_type, Some("transition_fire".into()));
395 }
396
397 // -- Edge cases --
398

Callers

nothing calls this directly

Calls 3

sample_session_eventFunction · 0.85
to_bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected