()
| 769 | |
| 770 | #[test] |
| 771 | fn header_roundtrip() { |
| 772 | let hdr = Header { |
| 773 | log_format_version: 42, |
| 774 | checksum_algorithm: 7, |
| 775 | }; |
| 776 | |
| 777 | let mut buf = [0u8; Header::LEN]; |
| 778 | hdr.write(&mut &mut buf[..]).unwrap(); |
| 779 | let h2 = Header::decode(&buf[..]).unwrap(); |
| 780 | |
| 781 | assert_eq!(hdr, h2); |
| 782 | } |
| 783 | |
| 784 | #[test] |
| 785 | fn write_read_roundtrip() { |