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

Function test_encode_size_reasonable

atomic-agent/src/envelope.rs:696–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

694
695 #[test]
696 fn test_encode_size_reasonable() {
697 // A full envelope should be well under 1KB
698 let e = make_envelope();
699 let bytes = e.encode().unwrap();
700 assert!(
701 bytes.len() < 1024,
702 "Encoded size {} exceeds 1KB",
703 bytes.len()
704 );
705
706 // Minimal envelope should be very small
707 let e = make_minimal_envelope();
708 let bytes = e.encode().unwrap();
709 assert!(
710 bytes.len() < 256,
711 "Minimal encoded size {} exceeds 256 bytes",
712 bytes.len()
713 );
714 }
715
716 // Decode error cases
717

Callers

nothing calls this directly

Calls 4

make_envelopeFunction · 0.85
make_minimal_envelopeFunction · 0.85
encodeMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected