Lines Matching refs:assert_eq
1252 assert_eq!(recv.len, 0); in empty_read()
1256 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in empty_read()
1262 assert_eq!(recv.len, 0); in empty_stream_frame()
1266 assert_eq!(recv.len, 5); in empty_stream_frame()
1267 assert_eq!(recv.off, 0); in empty_stream_frame()
1268 assert_eq!(recv.data.len(), 1); in empty_stream_frame()
1271 assert_eq!(recv.pop(&mut buf), Ok((5, false))); in empty_stream_frame()
1276 assert_eq!(recv.len, 5); in empty_stream_frame()
1277 assert_eq!(recv.off, 5); in empty_stream_frame()
1278 assert_eq!(recv.data.len(), 0); in empty_stream_frame()
1282 assert_eq!(recv.push(buf), Err(Error::FlowControl)); in empty_stream_frame()
1287 assert_eq!(recv.len, 5); in empty_stream_frame()
1288 assert_eq!(recv.off, 5); in empty_stream_frame()
1289 assert_eq!(recv.data.len(), 1); in empty_stream_frame()
1294 assert_eq!(recv.len, 5); in empty_stream_frame()
1295 assert_eq!(recv.off, 5); in empty_stream_frame()
1296 assert_eq!(recv.data.len(), 1); in empty_stream_frame()
1301 assert_eq!(recv.len, 5); in empty_stream_frame()
1302 assert_eq!(recv.off, 5); in empty_stream_frame()
1303 assert_eq!(recv.data.len(), 1); in empty_stream_frame()
1307 assert_eq!(recv.push(buf), Err(Error::FinalSize)); in empty_stream_frame()
1309 assert_eq!(recv.push(buf), Err(Error::FinalSize)); in empty_stream_frame()
1312 assert_eq!(recv.pop(&mut buf), Ok((0, true))); in empty_stream_frame()
1318 assert_eq!(recv.len, 0); in ordered_read()
1327 assert_eq!(recv.len, 10); in ordered_read()
1328 assert_eq!(recv.off, 0); in ordered_read()
1330 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in ordered_read()
1333 assert_eq!(recv.len, 19); in ordered_read()
1334 assert_eq!(recv.off, 0); in ordered_read()
1336 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in ordered_read()
1339 assert_eq!(recv.len, 19); in ordered_read()
1340 assert_eq!(recv.off, 0); in ordered_read()
1343 assert_eq!(len, 19); in ordered_read()
1344 assert_eq!(fin, true); in ordered_read()
1345 assert_eq!(&buf[..len], b"helloworldsomething"); in ordered_read()
1346 assert_eq!(recv.len, 19); in ordered_read()
1347 assert_eq!(recv.off, 19); in ordered_read()
1349 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in ordered_read()
1355 assert_eq!(recv.len, 0); in split_read()
1363 assert_eq!(recv.len, 9); in split_read()
1364 assert_eq!(recv.off, 0); in split_read()
1367 assert_eq!(recv.len, 19); in split_read()
1368 assert_eq!(recv.off, 0); in split_read()
1371 assert_eq!(len, 10); in split_read()
1372 assert_eq!(fin, false); in split_read()
1373 assert_eq!(&buf[..len], b"somethingh"); in split_read()
1374 assert_eq!(recv.len, 19); in split_read()
1375 assert_eq!(recv.off, 10); in split_read()
1378 assert_eq!(len, 5); in split_read()
1379 assert_eq!(fin, false); in split_read()
1380 assert_eq!(&buf[..len], b"ellow"); in split_read()
1381 assert_eq!(recv.len, 19); in split_read()
1382 assert_eq!(recv.off, 15); in split_read()
1385 assert_eq!(len, 4); in split_read()
1386 assert_eq!(fin, true); in split_read()
1387 assert_eq!(&buf[..len], b"orld"); in split_read()
1388 assert_eq!(recv.len, 19); in split_read()
1389 assert_eq!(recv.off, 19); in split_read()
1395 assert_eq!(recv.len, 0); in incomplete_read()
1403 assert_eq!(recv.len, 19); in incomplete_read()
1404 assert_eq!(recv.off, 0); in incomplete_read()
1406 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in incomplete_read()
1409 assert_eq!(recv.len, 19); in incomplete_read()
1410 assert_eq!(recv.off, 0); in incomplete_read()
1413 assert_eq!(len, 19); in incomplete_read()
1414 assert_eq!(fin, true); in incomplete_read()
1415 assert_eq!(&buf[..len], b"somethinghelloworld"); in incomplete_read()
1416 assert_eq!(recv.len, 19); in incomplete_read()
1417 assert_eq!(recv.off, 19); in incomplete_read()
1423 assert_eq!(recv.len, 0); in zero_len_read()
1431 assert_eq!(recv.len, 9); in zero_len_read()
1432 assert_eq!(recv.off, 0); in zero_len_read()
1433 assert_eq!(recv.data.len(), 1); in zero_len_read()
1436 assert_eq!(recv.len, 9); in zero_len_read()
1437 assert_eq!(recv.off, 0); in zero_len_read()
1438 assert_eq!(recv.data.len(), 1); in zero_len_read()
1441 assert_eq!(len, 9); in zero_len_read()
1442 assert_eq!(fin, true); in zero_len_read()
1443 assert_eq!(&buf[..len], b"something"); in zero_len_read()
1444 assert_eq!(recv.len, 9); in zero_len_read()
1445 assert_eq!(recv.off, 9); in zero_len_read()
1451 assert_eq!(recv.len, 0); in past_read()
1461 assert_eq!(recv.len, 9); in past_read()
1462 assert_eq!(recv.off, 0); in past_read()
1463 assert_eq!(recv.data.len(), 1); in past_read()
1466 assert_eq!(len, 9); in past_read()
1467 assert_eq!(fin, false); in past_read()
1468 assert_eq!(&buf[..len], b"something"); in past_read()
1469 assert_eq!(recv.len, 9); in past_read()
1470 assert_eq!(recv.off, 9); in past_read()
1473 assert_eq!(recv.len, 9); in past_read()
1474 assert_eq!(recv.off, 9); in past_read()
1475 assert_eq!(recv.data.len(), 0); in past_read()
1477 assert_eq!(recv.push(third), Err(Error::FinalSize)); in past_read()
1480 assert_eq!(recv.len, 9); in past_read()
1481 assert_eq!(recv.off, 9); in past_read()
1482 assert_eq!(recv.data.len(), 0); in past_read()
1484 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in past_read()
1490 assert_eq!(recv.len, 0); in fully_overlapping_read()
1498 assert_eq!(recv.len, 9); in fully_overlapping_read()
1499 assert_eq!(recv.off, 0); in fully_overlapping_read()
1500 assert_eq!(recv.data.len(), 1); in fully_overlapping_read()
1503 assert_eq!(recv.len, 9); in fully_overlapping_read()
1504 assert_eq!(recv.off, 0); in fully_overlapping_read()
1505 assert_eq!(recv.data.len(), 1); in fully_overlapping_read()
1508 assert_eq!(len, 9); in fully_overlapping_read()
1509 assert_eq!(fin, false); in fully_overlapping_read()
1510 assert_eq!(&buf[..len], b"something"); in fully_overlapping_read()
1511 assert_eq!(recv.len, 9); in fully_overlapping_read()
1512 assert_eq!(recv.off, 9); in fully_overlapping_read()
1513 assert_eq!(recv.data.len(), 0); in fully_overlapping_read()
1515 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in fully_overlapping_read()
1521 assert_eq!(recv.len, 0); in fully_overlapping_read2()
1529 assert_eq!(recv.len, 9); in fully_overlapping_read2()
1530 assert_eq!(recv.off, 0); in fully_overlapping_read2()
1531 assert_eq!(recv.data.len(), 1); in fully_overlapping_read2()
1534 assert_eq!(recv.len, 9); in fully_overlapping_read2()
1535 assert_eq!(recv.off, 0); in fully_overlapping_read2()
1536 assert_eq!(recv.data.len(), 2); in fully_overlapping_read2()
1539 assert_eq!(len, 9); in fully_overlapping_read2()
1540 assert_eq!(fin, false); in fully_overlapping_read2()
1541 assert_eq!(&buf[..len], b"somehello"); in fully_overlapping_read2()
1542 assert_eq!(recv.len, 9); in fully_overlapping_read2()
1543 assert_eq!(recv.off, 9); in fully_overlapping_read2()
1544 assert_eq!(recv.data.len(), 0); in fully_overlapping_read2()
1546 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in fully_overlapping_read2()
1552 assert_eq!(recv.len, 0); in fully_overlapping_read3()
1560 assert_eq!(recv.len, 8); in fully_overlapping_read3()
1561 assert_eq!(recv.off, 0); in fully_overlapping_read3()
1562 assert_eq!(recv.data.len(), 1); in fully_overlapping_read3()
1565 assert_eq!(recv.len, 9); in fully_overlapping_read3()
1566 assert_eq!(recv.off, 0); in fully_overlapping_read3()
1567 assert_eq!(recv.data.len(), 3); in fully_overlapping_read3()
1570 assert_eq!(len, 9); in fully_overlapping_read3()
1571 assert_eq!(fin, false); in fully_overlapping_read3()
1572 assert_eq!(&buf[..len], b"somhellog"); in fully_overlapping_read3()
1573 assert_eq!(recv.len, 9); in fully_overlapping_read3()
1574 assert_eq!(recv.off, 9); in fully_overlapping_read3()
1575 assert_eq!(recv.data.len(), 0); in fully_overlapping_read3()
1577 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in fully_overlapping_read3()
1583 assert_eq!(recv.len, 0); in fully_overlapping_read_multi()
1592 assert_eq!(recv.len, 8); in fully_overlapping_read_multi()
1593 assert_eq!(recv.off, 0); in fully_overlapping_read_multi()
1594 assert_eq!(recv.data.len(), 1); in fully_overlapping_read_multi()
1597 assert_eq!(recv.len, 17); in fully_overlapping_read_multi()
1598 assert_eq!(recv.off, 0); in fully_overlapping_read_multi()
1599 assert_eq!(recv.data.len(), 2); in fully_overlapping_read_multi()
1602 assert_eq!(recv.len, 18); in fully_overlapping_read_multi()
1603 assert_eq!(recv.off, 0); in fully_overlapping_read_multi()
1604 assert_eq!(recv.data.len(), 5); in fully_overlapping_read_multi()
1607 assert_eq!(len, 18); in fully_overlapping_read_multi()
1608 assert_eq!(fin, false); in fully_overlapping_read_multi()
1609 assert_eq!(&buf[..len], b"somhellogsomhellog"); in fully_overlapping_read_multi()
1610 assert_eq!(recv.len, 18); in fully_overlapping_read_multi()
1611 assert_eq!(recv.off, 18); in fully_overlapping_read_multi()
1612 assert_eq!(recv.data.len(), 0); in fully_overlapping_read_multi()
1614 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in fully_overlapping_read_multi()
1620 assert_eq!(recv.len, 0); in overlapping_start_read()
1628 assert_eq!(recv.len, 9); in overlapping_start_read()
1629 assert_eq!(recv.off, 0); in overlapping_start_read()
1630 assert_eq!(recv.data.len(), 1); in overlapping_start_read()
1633 assert_eq!(recv.len, 13); in overlapping_start_read()
1634 assert_eq!(recv.off, 0); in overlapping_start_read()
1635 assert_eq!(recv.data.len(), 2); in overlapping_start_read()
1638 assert_eq!(len, 13); in overlapping_start_read()
1639 assert_eq!(fin, true); in overlapping_start_read()
1640 assert_eq!(&buf[..len], b"somethingello"); in overlapping_start_read()
1641 assert_eq!(recv.len, 13); in overlapping_start_read()
1642 assert_eq!(recv.off, 13); in overlapping_start_read()
1644 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in overlapping_start_read()
1650 assert_eq!(recv.len, 0); in overlapping_end_read()
1658 assert_eq!(recv.len, 12); in overlapping_end_read()
1659 assert_eq!(recv.off, 0); in overlapping_end_read()
1660 assert_eq!(recv.data.len(), 1); in overlapping_end_read()
1663 assert_eq!(recv.len, 12); in overlapping_end_read()
1664 assert_eq!(recv.off, 0); in overlapping_end_read()
1665 assert_eq!(recv.data.len(), 2); in overlapping_end_read()
1668 assert_eq!(len, 12); in overlapping_end_read()
1669 assert_eq!(fin, true); in overlapping_end_read()
1670 assert_eq!(&buf[..len], b"helsomething"); in overlapping_end_read()
1671 assert_eq!(recv.len, 12); in overlapping_end_read()
1672 assert_eq!(recv.off, 12); in overlapping_end_read()
1674 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in overlapping_end_read()
1680 assert_eq!(recv.len, 0); in partially_multi_overlapping_reordered_read()
1689 assert_eq!(recv.len, 13); in partially_multi_overlapping_reordered_read()
1690 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read()
1691 assert_eq!(recv.data.len(), 1); in partially_multi_overlapping_reordered_read()
1694 assert_eq!(recv.len, 13); in partially_multi_overlapping_reordered_read()
1695 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read()
1696 assert_eq!(recv.data.len(), 2); in partially_multi_overlapping_reordered_read()
1699 assert_eq!(recv.len, 15); in partially_multi_overlapping_reordered_read()
1700 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read()
1701 assert_eq!(recv.data.len(), 3); in partially_multi_overlapping_reordered_read()
1704 assert_eq!(len, 15); in partially_multi_overlapping_reordered_read()
1705 assert_eq!(fin, true); in partially_multi_overlapping_reordered_read()
1706 assert_eq!(&buf[..len], b"somethinhelloar"); in partially_multi_overlapping_reordered_read()
1707 assert_eq!(recv.len, 15); in partially_multi_overlapping_reordered_read()
1708 assert_eq!(recv.off, 15); in partially_multi_overlapping_reordered_read()
1709 assert_eq!(recv.data.len(), 0); in partially_multi_overlapping_reordered_read()
1711 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in partially_multi_overlapping_reordered_read()
1717 assert_eq!(recv.len, 0); in partially_multi_overlapping_reordered_read2()
1729 assert_eq!(recv.len, 5); in partially_multi_overlapping_reordered_read2()
1730 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1731 assert_eq!(recv.data.len(), 1); in partially_multi_overlapping_reordered_read2()
1734 assert_eq!(recv.len, 9); in partially_multi_overlapping_reordered_read2()
1735 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1736 assert_eq!(recv.data.len(), 2); in partially_multi_overlapping_reordered_read2()
1739 assert_eq!(recv.len, 9); in partially_multi_overlapping_reordered_read2()
1740 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1741 assert_eq!(recv.data.len(), 3); in partially_multi_overlapping_reordered_read2()
1744 assert_eq!(recv.len, 9); in partially_multi_overlapping_reordered_read2()
1745 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1746 assert_eq!(recv.data.len(), 4); in partially_multi_overlapping_reordered_read2()
1749 assert_eq!(recv.len, 14); in partially_multi_overlapping_reordered_read2()
1750 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1751 assert_eq!(recv.data.len(), 5); in partially_multi_overlapping_reordered_read2()
1754 assert_eq!(recv.len, 14); in partially_multi_overlapping_reordered_read2()
1755 assert_eq!(recv.off, 0); in partially_multi_overlapping_reordered_read2()
1756 assert_eq!(recv.data.len(), 6); in partially_multi_overlapping_reordered_read2()
1759 assert_eq!(len, 14); in partially_multi_overlapping_reordered_read2()
1760 assert_eq!(fin, false); in partially_multi_overlapping_reordered_read2()
1761 assert_eq!(&buf[..len], b"aabbbcdddeefff"); in partially_multi_overlapping_reordered_read2()
1762 assert_eq!(recv.len, 14); in partially_multi_overlapping_reordered_read2()
1763 assert_eq!(recv.off, 14); in partially_multi_overlapping_reordered_read2()
1764 assert_eq!(recv.data.len(), 0); in partially_multi_overlapping_reordered_read2()
1766 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in partially_multi_overlapping_reordered_read2()
1772 assert_eq!(send.len, 0); in empty_write()
1775 assert_eq!(write.len(), 0); in empty_write()
1776 assert_eq!(write.fin(), false); in empty_write()
1782 assert_eq!(send.len, 0); in multi_write()
1788 assert_eq!(send.len, 9); in multi_write()
1791 assert_eq!(send.len, 19); in multi_write()
1794 assert_eq!(write.len(), 19); in multi_write()
1795 assert_eq!(write.fin(), true); in multi_write()
1796 assert_eq!(&write[..], b"somethinghelloworld"); in multi_write()
1797 assert_eq!(send.len, 0); in multi_write()
1803 assert_eq!(send.len, 0); in split_write()
1809 assert_eq!(send.len, 9); in split_write()
1812 assert_eq!(send.len, 19); in split_write()
1815 assert_eq!(write.off(), 0); in split_write()
1816 assert_eq!(write.len(), 10); in split_write()
1817 assert_eq!(write.fin(), false); in split_write()
1818 assert_eq!(&write[..], b"somethingh"); in split_write()
1819 assert_eq!(send.len, 9); in split_write()
1822 assert_eq!(write.off(), 10); in split_write()
1823 assert_eq!(write.len(), 5); in split_write()
1824 assert_eq!(write.fin(), false); in split_write()
1825 assert_eq!(&write[..], b"ellow"); in split_write()
1826 assert_eq!(send.len, 4); in split_write()
1829 assert_eq!(write.off(), 15); in split_write()
1830 assert_eq!(write.len(), 4); in split_write()
1831 assert_eq!(write.fin(), true); in split_write()
1832 assert_eq!(&write[..], b"orld"); in split_write()
1833 assert_eq!(send.len, 0); in split_write()
1839 assert_eq!(send.len, 0); in resend()
1840 assert_eq!(send.off_front(), 0); in resend()
1846 assert_eq!(send.off_front(), 0); in resend()
1849 assert_eq!(send.off_front(), 0); in resend()
1852 assert_eq!(write1.off(), 0); in resend()
1853 assert_eq!(write1.len(), 4); in resend()
1854 assert_eq!(write1.fin(), false); in resend()
1855 assert_eq!(&write1[..], b"some"); in resend()
1856 assert_eq!(send.len, 15); in resend()
1857 assert_eq!(send.off_front(), 4); in resend()
1860 assert_eq!(write2.off(), 4); in resend()
1861 assert_eq!(write2.len(), 5); in resend()
1862 assert_eq!(write2.fin(), false); in resend()
1863 assert_eq!(&write2[..], b"thing"); in resend()
1864 assert_eq!(send.len, 10); in resend()
1865 assert_eq!(send.off_front(), 9); in resend()
1868 assert_eq!(write3.off(), 9); in resend()
1869 assert_eq!(write3.len(), 5); in resend()
1870 assert_eq!(write3.fin(), false); in resend()
1871 assert_eq!(&write3[..], b"hello"); in resend()
1872 assert_eq!(send.len, 5); in resend()
1873 assert_eq!(send.off_front(), 14); in resend()
1876 assert_eq!(send.len, 10); in resend()
1877 assert_eq!(send.off_front(), 4); in resend()
1880 assert_eq!(send.len, 14); in resend()
1881 assert_eq!(send.off_front(), 0); in resend()
1884 assert_eq!(write4.off(), 0); in resend()
1885 assert_eq!(write4.len(), 9); in resend()
1886 assert_eq!(write4.fin(), false); in resend()
1887 assert_eq!(&write4[..], b"something"); in resend()
1888 assert_eq!(send.len, 5); in resend()
1889 assert_eq!(send.off_front(), 14); in resend()
1892 assert_eq!(write5.off(), 14); in resend()
1893 assert_eq!(write5.len(), 5); in resend()
1894 assert_eq!(write5.fin(), true); in resend()
1895 assert_eq!(&write5[..], b"world"); in resend()
1896 assert_eq!(send.len, 0); in resend()
1897 assert_eq!(send.off_front(), 19); in resend()
1903 assert_eq!(send.len, 0); in write_blocked_by_off()
1908 assert_eq!(send.push_slice(first, false), Ok(0)); in write_blocked_by_off()
1909 assert_eq!(send.len, 0); in write_blocked_by_off()
1911 assert_eq!(send.push_slice(second, true), Ok(0)); in write_blocked_by_off()
1912 assert_eq!(send.len, 0); in write_blocked_by_off()
1916 assert_eq!(send.push_slice(first, false), Ok(5)); in write_blocked_by_off()
1917 assert_eq!(send.len, 5); in write_blocked_by_off()
1919 assert_eq!(send.push_slice(second, true), Ok(0)); in write_blocked_by_off()
1920 assert_eq!(send.len, 5); in write_blocked_by_off()
1923 assert_eq!(write.off(), 0); in write_blocked_by_off()
1924 assert_eq!(write.len(), 5); in write_blocked_by_off()
1925 assert_eq!(write.fin(), false); in write_blocked_by_off()
1926 assert_eq!(&write[..], b"somet"); in write_blocked_by_off()
1927 assert_eq!(send.len, 0); in write_blocked_by_off()
1930 assert_eq!(write.off(), 5); in write_blocked_by_off()
1931 assert_eq!(write.len(), 0); in write_blocked_by_off()
1932 assert_eq!(write.fin(), false); in write_blocked_by_off()
1933 assert_eq!(&write[..], b""); in write_blocked_by_off()
1934 assert_eq!(send.len, 0); in write_blocked_by_off()
1938 assert_eq!(send.push_slice(&first[5..], false), Ok(4)); in write_blocked_by_off()
1939 assert_eq!(send.len, 4); in write_blocked_by_off()
1941 assert_eq!(send.push_slice(second, true), Ok(6)); in write_blocked_by_off()
1942 assert_eq!(send.len, 10); in write_blocked_by_off()
1945 assert_eq!(write.off(), 5); in write_blocked_by_off()
1946 assert_eq!(write.len(), 10); in write_blocked_by_off()
1947 assert_eq!(write.fin(), false); in write_blocked_by_off()
1948 assert_eq!(&write[..], b"hinghellow"); in write_blocked_by_off()
1949 assert_eq!(send.len, 0); in write_blocked_by_off()
1953 assert_eq!(send.push_slice(&second[6..], true), Ok(4)); in write_blocked_by_off()
1954 assert_eq!(send.len, 4); in write_blocked_by_off()
1957 assert_eq!(write.off(), 15); in write_blocked_by_off()
1958 assert_eq!(write.len(), 4); in write_blocked_by_off()
1959 assert_eq!(write.fin(), true); in write_blocked_by_off()
1960 assert_eq!(&write[..], b"orld"); in write_blocked_by_off()
1961 assert_eq!(send.len, 0); in write_blocked_by_off()
1967 assert_eq!(send.len, 0); in zero_len_write()
1972 assert_eq!(send.len, 9); in zero_len_write()
1975 assert_eq!(send.len, 9); in zero_len_write()
1978 assert_eq!(write.off(), 0); in zero_len_write()
1979 assert_eq!(write.len(), 9); in zero_len_write()
1980 assert_eq!(write.fin(), true); in zero_len_write()
1981 assert_eq!(&write[..], b"something"); in zero_len_write()
1982 assert_eq!(send.len, 0); in zero_len_write()
1996 assert_eq!(stream.recv.push(second), Ok(())); in recv_flow_control()
1997 assert_eq!(stream.recv.push(first), Ok(())); in recv_flow_control()
2000 assert_eq!(stream.recv.push(third), Err(Error::FlowControl)); in recv_flow_control()
2003 assert_eq!(&buf[..len], b"helloworld"); in recv_flow_control()
2004 assert_eq!(fin, false); in recv_flow_control()
2009 assert_eq!(stream.recv.max_data_next(), 25); in recv_flow_control()
2013 assert_eq!(stream.recv.push(third), Ok(())); in recv_flow_control()
2024 assert_eq!(stream.recv.push(first), Ok(())); in recv_past_fin()
2025 assert_eq!(stream.recv.push(second), Err(Error::FinalSize)); in recv_past_fin()
2036 assert_eq!(stream.recv.push(first), Ok(())); in recv_fin_dup()
2037 assert_eq!(stream.recv.push(second), Ok(())); in recv_fin_dup()
2042 assert_eq!(&buf[..len], b"hello"); in recv_fin_dup()
2043 assert_eq!(fin, true); in recv_fin_dup()
2054 assert_eq!(stream.recv.push(second), Ok(())); in recv_fin_change()
2055 assert_eq!(stream.recv.push(first), Err(Error::FinalSize)); in recv_fin_change()
2066 assert_eq!(stream.recv.push(second), Ok(())); in recv_fin_lower_than_received()
2067 assert_eq!(stream.recv.push(first), Err(Error::FinalSize)); in recv_fin_lower_than_received()
2080 assert_eq!(stream.recv.push(first), Ok(())); in recv_fin_flow_control()
2081 assert_eq!(stream.recv.push(second), Ok(())); in recv_fin_flow_control()
2084 assert_eq!(&buf[..len], b"helloworld"); in recv_fin_flow_control()
2085 assert_eq!(fin, true); in recv_fin_flow_control()
2097 assert_eq!(stream.recv.push(first), Ok(())); in recv_fin_reset_mismatch()
2098 assert_eq!(stream.recv.reset(10), Err(Error::FinalSize)); in recv_fin_reset_mismatch()
2108 assert_eq!(stream.recv.push(first), Ok(())); in recv_reset_dup()
2109 assert_eq!(stream.recv.reset(5), Ok(0)); in recv_reset_dup()
2110 assert_eq!(stream.recv.reset(5), Ok(0)); in recv_reset_dup()
2120 assert_eq!(stream.recv.push(first), Ok(())); in recv_reset_change()
2121 assert_eq!(stream.recv.reset(5), Ok(0)); in recv_reset_change()
2122 assert_eq!(stream.recv.reset(10), Err(Error::FinalSize)); in recv_reset_change()
2132 assert_eq!(stream.recv.push(first), Ok(())); in recv_reset_lower_than_received()
2133 assert_eq!(stream.recv.reset(4), Err(Error::FinalSize)); in recv_reset_lower_than_received()
2149 assert_eq!(write.off(), 0); in send_flow_control()
2150 assert_eq!(write.len(), 15); in send_flow_control()
2151 assert_eq!(write.fin(), false); in send_flow_control()
2152 assert_eq!(write.data, b"helloworldsomet"); in send_flow_control()
2155 assert_eq!(write.off(), 15); in send_flow_control()
2156 assert_eq!(write.len(), 0); in send_flow_control()
2157 assert_eq!(write.fin(), false); in send_flow_control()
2158 assert_eq!(write.data, b""); in send_flow_control()
2161 assert_eq!(stream.send.push(first), Ok(())); in send_flow_control()
2164 assert_eq!(write.off(), 0); in send_flow_control()
2165 assert_eq!(write.len(), 10); in send_flow_control()
2166 assert_eq!(write.fin(), false); in send_flow_control()
2167 assert_eq!(write.data, b"helloworld"); in send_flow_control()
2170 assert_eq!(write.off(), 10); in send_flow_control()
2171 assert_eq!(write.len(), 5); in send_flow_control()
2172 assert_eq!(write.fin(), false); in send_flow_control()
2173 assert_eq!(write.data, b"somet"); in send_flow_control()
2184 assert_eq!(stream.send.push_slice(first, false), Ok(5)); in send_past_fin()
2186 assert_eq!(stream.send.push_slice(second, true), Ok(5)); in send_past_fin()
2189 assert_eq!(stream.send.push_slice(third, false), Err(Error::FinalSize)); in send_past_fin()
2199 assert_eq!(stream.send.push(first), Ok(())); in send_fin_dup()
2200 assert_eq!(stream.send.push(second), Ok(())); in send_fin_dup()
2210 assert_eq!(stream.send.push_slice(first, true), Ok(5)); in send_undo_fin()
2213 assert_eq!(stream.send.push(second), Err(Error::FinalSize)); in send_undo_fin()
2225 assert_eq!(write.off(), 0); in send_fin_max_data_match()
2226 assert_eq!(write.len(), 15); in send_fin_max_data_match()
2227 assert_eq!(write.fin(), true); in send_fin_max_data_match()
2228 assert_eq!(write.data, slice); in send_fin_max_data_match()
2235 assert_eq!(stream.send.push_slice(b"hello", false), Ok(5)); in send_fin_zero_length()
2236 assert_eq!(stream.send.push_slice(b"", true), Ok(0)); in send_fin_zero_length()
2240 assert_eq!(write.off(), 0); in send_fin_zero_length()
2241 assert_eq!(write.len(), 5); in send_fin_zero_length()
2242 assert_eq!(write.fin(), true); in send_fin_zero_length()
2243 assert_eq!(write.data, b"hello"); in send_fin_zero_length()
2250 assert_eq!(stream.send.push_slice(b"hello", false), Ok(5)); in send_ack()
2251 assert_eq!(stream.send.push_slice(b"world", false), Ok(5)); in send_ack()
2252 assert_eq!(stream.send.push_slice(b"", true), Ok(0)); in send_ack()
2256 assert_eq!(write.off(), 0); in send_ack()
2257 assert_eq!(write.len(), 5); in send_ack()
2258 assert_eq!(write.fin(), false); in send_ack()
2259 assert_eq!(write.data, b"hello"); in send_ack()
2263 assert_eq!(stream.send.push(write), Ok(())); in send_ack()
2266 assert_eq!(write.off(), 5); in send_ack()
2267 assert_eq!(write.len(), 5); in send_ack()
2268 assert_eq!(write.fin(), true); in send_ack()
2269 assert_eq!(write.data, b"world"); in send_ack()
2276 assert_eq!(stream.send.push_slice(b"hello", false), Ok(5)); in send_ack_reordering()
2277 assert_eq!(stream.send.push_slice(b"world", false), Ok(5)); in send_ack_reordering()
2278 assert_eq!(stream.send.push_slice(b"", true), Ok(0)); in send_ack_reordering()
2282 assert_eq!(write1.off(), 0); in send_ack_reordering()
2283 assert_eq!(write1.len(), 5); in send_ack_reordering()
2284 assert_eq!(write1.fin(), false); in send_ack_reordering()
2285 assert_eq!(write1.data, b"hello"); in send_ack_reordering()
2288 assert_eq!(write2.off(), 5); in send_ack_reordering()
2289 assert_eq!(write2.len(), 1); in send_ack_reordering()
2290 assert_eq!(write2.fin(), false); in send_ack_reordering()
2291 assert_eq!(write2.data, b"w"); in send_ack_reordering()
2296 assert_eq!(stream.send.push(write1), Ok(())); in send_ack_reordering()
2297 assert_eq!(stream.send.push(write2), Ok(())); in send_ack_reordering()
2300 assert_eq!(write.off(), 6); in send_ack_reordering()
2301 assert_eq!(write.len(), 4); in send_ack_reordering()
2302 assert_eq!(write.fin(), true); in send_ack_reordering()
2303 assert_eq!(write.data, b"orld"); in send_ack_reordering()
2312 assert_eq!(stream.recv.push(first), Ok(())); in recv_data_below_off()
2317 assert_eq!(&buf[..len], b"hello"); in recv_data_below_off()
2318 assert_eq!(fin, false); in recv_data_below_off()
2321 assert_eq!(stream.recv.push(first), Ok(())); in recv_data_below_off()
2324 assert_eq!(&buf[..len], b"world"); in recv_data_below_off()
2325 assert_eq!(fin, true); in recv_data_below_off()
2332 assert_eq!(stream.send.push_slice(b"hello", false), Ok(5)); in stream_complete()
2333 assert_eq!(stream.send.push_slice(b"world", false), Ok(5)); in stream_complete()
2338 assert_eq!(stream.send.push_slice(b"", true), Ok(0)); in stream_complete()
2351 assert_eq!(stream.recv.pop(&mut buf), Ok((2, false))); in stream_complete()
2363 assert_eq!(stream.recv.pop(&mut buf), Ok((3, true))); in stream_complete()
2373 assert_eq!(stream.send.push_slice(b"hello", false), Ok(5)); in send_fin_zero_length_output()
2377 assert_eq!(write.off(), 0); in send_fin_zero_length_output()
2378 assert_eq!(write.len(), 5); in send_fin_zero_length_output()
2379 assert_eq!(write.fin(), false); in send_fin_zero_length_output()
2380 assert_eq!(write.data, b"hello"); in send_fin_zero_length_output()
2382 assert_eq!(stream.send.push_slice(b"", true), Ok(0)); in send_fin_zero_length_output()
2386 assert_eq!(write.off(), 5); in send_fin_zero_length_output()
2387 assert_eq!(write.len(), 0); in send_fin_zero_length_output()
2388 assert_eq!(write.fin(), true); in send_fin_zero_length_output()
2389 assert_eq!(write.data, b""); in send_fin_zero_length_output()