MCPcopy Create free account
hub / github.com/base/base / test_empty_span_batch

Function test_empty_span_batch

crates/consensus/protocol/src/batch/core.rs:136–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135 #[test]
136 fn test_empty_span_batch() {
137 let mut out = Vec::new();
138 let batch = Batch::Span(SpanBatch::default());
139 // Fails to even encode an empty span batch - decoding will do the same
140 let err = batch.encode(&mut out).unwrap_err();
141 assert_eq!(BatchEncodingError::SpanBatchError(SpanBatchError::EmptySpanBatch), err);
142 }
143}

Callers

nothing calls this directly

Calls 3

SpanClass · 0.85
newFunction · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected