one more test

This commit is contained in:
andy 2020-09-07 00:45:35 -03:00
parent 27a87ffe96
commit bc7e513a74

View File

@ -280,6 +280,7 @@ mod test {
#[test]
fn test_create_bytes_from_esweapon() {
// PSYCHO WAND + 72 (Chaos)
let testweapon = ESWeapon {
esweapon: ESWeaponType::Wand,
special: Some(ESWeaponSpecial::Chaos),
@ -289,4 +290,19 @@ mod test {
let bytes = testweapon.as_bytes();
assert_eq!(bytes, [0x00, 0x7B, 0x09, 0x48, 0x00, 0x00, 0x82, 0x13, 0xE4, 0x68, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00]);
}
#[test]
fn test_create_bytes_from_higher_esweapon_type() {
// YUGIOH CARDS + 105 (Spirit)
let testweapon = ESWeapon {
esweapon: ESWeaponType::Cards,
special: Some(ESWeaponSpecial::Spirit),
grind: 105u8,
name: "YUGIOH".to_owned(),
};
let bytes = testweapon.as_bytes();
assert_eq!(bytes, [0x00, 0xA7, 0x0B, 0x69, 0x00, 0x00, 0x83, 0x35, 0x9D, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00]);
}
}