We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d9ba00 commit a64ece6Copy full SHA for a64ece6
src/rtr/pdu.rs
@@ -1879,6 +1879,33 @@ mod test {
1879
);
1880
}
1881
1882
+ #[tokio::test]
1883
+ async fn end_of_data_versions() {
1884
+ for (version, raw) in [
1885
+ (0,
1886
+ vec![0, 7, 0x12, 0x34, 0, 0, 0, 12, 0xde, 0xad, 0xbe, 0xef]
1887
+ ),
1888
+ (1,
1889
+ vec![0x01, 0x07, 0x8e, 0xef, 0x00, 0x00, 0x00, 0x18,
1890
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8f,
1891
+ 0x00, 0x00, 0x02, 0x58, 0x00, 0x00, 0x1c, 0x20
1892
+ ]
1893
1894
+ (2,
1895
+ vec![0x02, 0x07, 0x8e, 0xef, 0x00, 0x00, 0x00, 0x18,
1896
1897
1898
1899
+ )
1900
+ ] {
1901
+ if let Err(eod) = Payload::read(&mut raw.as_slice()).await.unwrap() {
1902
+ assert_eq!(version, eod.version());
1903
+ } else {
1904
+ panic!("expected End of Data PDU");
1905
+ }
1906
1907
1908
+
1909
#[tokio::test]
1910
async fn read_write_cache_reset() {
1911
read_write!(
0 commit comments