diff options
Diffstat (limited to 'azalea-protocol/src')
| -rw-r--r-- | azalea-protocol/src/packets/game/c_set_equipment.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs index 11ee8b3a..15856ad7 100644 --- a/azalea-protocol/src/packets/game/c_set_equipment.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -52,3 +52,22 @@ impl AzBuf for EquipmentSlots { Ok(()) } } + +#[cfg(test)] +mod tests { + use std::io::Cursor; + + use azalea_buf::AzBuf; + + use super::*; + + #[test] + fn test_read_lifesteal_net_set_equipment() { + let contents = [1, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 7, 0]; + let mut buf = Cursor::new(contents.as_slice()); + let packet = ClientboundSetEquipment::azalea_read(&mut buf).unwrap(); + println!("{packet:?}"); + + assert_eq!(buf.position(), contents.len() as u64); + } +} |
