removing dev branch, many changes
This commit is contained in:
1
veilid-core/src/veilid_api/tests/mod.rs
Normal file
1
veilid-core/src/veilid_api/tests/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod test_serialize_rkyv;
|
16
veilid-core/src/veilid_api/tests/test_serialize_rkyv.rs
Normal file
16
veilid-core/src/veilid_api/tests/test_serialize_rkyv.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use crate::*;
|
||||
|
||||
pub async fn test_simple_string() {
|
||||
let plain = "basic string".to_string();
|
||||
let serialized = b"basic string\x0c\x00\x00\x00\xf4\xff\xff\xff".to_vec();
|
||||
|
||||
let a = to_rkyv(&plain);
|
||||
assert_eq!(a.unwrap(), serialized);
|
||||
|
||||
let b = from_rkyv::<String>(serialized);
|
||||
assert_eq!(b.unwrap(), plain);
|
||||
}
|
||||
|
||||
pub async fn test_all() {
|
||||
test_simple_string().await;
|
||||
}
|
Reference in New Issue
Block a user