Tests checking item sizes for changed types

This commit is contained in:
maciejhirsz
2017-01-30 20:01:32 +01:00
parent 6795068ea4
commit 681fa10d4b
5 changed files with 96 additions and 7 deletions

View File

@@ -242,3 +242,21 @@ impl HeapSizeOf for BlockReceipts {
self.receipts.heap_size_of_children()
}
}
#[cfg(test)]
mod tests {
use rlp::*;
use super::BlockReceipts;
#[test]
fn encode_block_receipts() {
let br = BlockReceipts::new(Vec::new());
let mut s = RlpStream::new_list(2);
s.append(&br);
assert!(!s.is_finished(), "List shouldn't finished yet");
s.append(&br);
assert!(s.is_finished(), "List should be finished now");
s.out();
}
}