use super::*;
use shapely_core::Shapely;
use shapely_core as shapely;
use shapely_derive::Shapely;
#[test]
fn it_works() {
#[derive(Debug, PartialEq, Shapely)]
struct TestStruct {
name: String,
age: u64,
}
let data = [
0x82, 0xa4, 0x6e, 0x61, 0x6d, 0x65, 0xa5, 0x41, 0x6c, 0x69, 0x63, 0x65, 0xa3, 0x61, 0x67, 0x65, 0xce, 0x00, 0x00, 0x00, 0x1e, ];
let mut partial = Partial::alloc(TestStruct::shape_desc());
from_msgpack(&mut partial, &data).unwrap();
let result = partial.build::<TestStruct>();
assert_eq!(
result,
TestStruct {
name: "Alice".to_string(),
age: 30,
}
);
}