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

Function test_serde_roundtrip

atomic-core/src/crdt/apply/options.rs:826–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

824
825 #[test]
826 fn test_serde_roundtrip() {
827 let options = ApplyOptions::builder()
828 .validate_ordering(true)
829 .fail_on_conflict(true)
830 .max_operations(Some(42))
831 .build();
832
833 let json = serde_json::to_string(&options).unwrap();
834 let restored: ApplyOptions = serde_json::from_str(&json).unwrap();
835
836 assert_eq!(options, restored);
837 }
838
839 #[test]
840 fn test_serde_strict() {

Callers

nothing calls this directly

Calls 5

max_operationsMethod · 0.80
fail_on_conflictMethod · 0.80
validate_orderingMethod · 0.80
buildMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected