From fafe72ac2d97bd5c94ad55bd55526c2dcba9b8ff Mon Sep 17 00:00:00 2001 From: Joey Sacchini Date: Fri, 9 Oct 2020 18:42:32 -0400 Subject: fix broken lighting data and totally rewrite chat engine --- src/test_macros.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/test_macros.rs') diff --git a/src/test_macros.rs b/src/test_macros.rs index 8283d30..254c3bb 100644 --- a/src/test_macros.rs +++ b/src/test_macros.rs @@ -19,9 +19,15 @@ macro_rules! packet_test_cases { data: bytes.as_slice(), }; - let deserialized = - <$pnam>::mc_deserialize(raw_packet).expect("deserialize succeeds"); - assert_eq!(packet, deserialized); + let deserialized = match <$pnam>::mc_deserialize(raw_packet) { + Err(err) => { + eprintln!("expected: {:?}", packet); + panic!("error: {:?}", err); + }, + Ok(out) => out + }; + assert_eq!(packet, deserialized, "deserialize(serialize(packet)) == packet"); + assert_eq!(packet.clone(), deserialized.clone(), "deserialized.clone() == packet.clone()") } } -- cgit