WIP on parsing

This commit is contained in:
Dominik Werder
2021-04-26 12:22:36 +02:00
parent 832cc1747e
commit 01f5244c21
2 changed files with 148 additions and 67 deletions

View File

@@ -1,4 +1,5 @@
use crate::spawn_test_hosts;
use bytes::{BufMut, BytesMut};
use chrono::Utc;
use err::Error;
use futures_util::TryStreamExt;
@@ -128,3 +129,11 @@ async fn get_cached_0_inner() -> Result<(), Error> {
//Err::<(), _>(format!("test error").into())
Ok(())
}
#[test]
fn bufs() {
let mut buf = BytesMut::with_capacity(1024);
assert!(buf.as_mut().len() == 0);
buf.put_u32_le(123);
assert!(buf.as_mut().len() == 4);
}