MCPcopy Create free account
hub / github.com/apache/fory / test_rc_weak_null_serialization

Function test_rc_weak_null_serialization

rust/tests/tests/test_weak.rs:27–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26#[test]
27fn test_rc_weak_null_serialization() {
28 let fory = Fory::builder()
29 .xlang(false)
30 .track_ref(true)
31 .compatible(false)
32 .build();
33
34 let weak: RcWeak<i32> = RcWeak::new();
35
36 let serialized = fory.serialize(&weak).unwrap();
37 let deserialized: RcWeak<i32> = fory.deserialize(&serialized).unwrap();
38
39 assert!(deserialized.upgrade().is_none());
40}
41
42#[test]
43fn test_arc_weak_null_serialization() {

Callers

nothing calls this directly

Calls 7

serializeMethod · 0.65
deserializeMethod · 0.65
buildMethod · 0.45
compatibleMethod · 0.45
track_refMethod · 0.45
xlangMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected