Fixup enum property test

This commit is contained in:
Joshua Goins 2025-02-25 19:47:51 -05:00
parent 22d431d410
commit ccc7182315

View file

@ -22,7 +22,7 @@ mod tests {
use std::io::Cursor; use std::io::Cursor;
#[test] #[test]
fn read_zero() { fn read_enum() {
// Persistent.sav // Persistent.sav
let data = [ let data = [
0x29, 0x00, 0x00, 0x29, 0x00, 0x00,
@ -37,9 +37,24 @@ mod tests {
0x50, 0x6f, 0x73, 0x50, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x00, 0x6f, 0x6e, 0x00,
0x00 0x00, 0x25, 0x00,
0x00, 0x00, 0x45,
0x44, 0x41, 0x57,
0x65, 0x61, 0x70,
0x6f, 0x6e, 0x4d,
0x6f, 0x64, 0x75,
0x6c, 0x65, 0x50,
0x6f, 0x73, 0x69,
0x74, 0x69, 0x6f,
0x6e, 0x3a, 0x3a,
0x46, 0x72, 0x6f,
0x6e, 0x74, 0x57,
0x65, 0x61, 0x70,
0x6f, 0x6e, 0x00
]; ];
let mut cursor = Cursor::new(data); let mut cursor = Cursor::new(data);
let decoded = EnumProperty::read_le(&mut cursor).unwrap(); let decoded = EnumProperty::read_le(&mut cursor).unwrap();
assert_eq!(decoded.enum_type, "EDAWeaponModulePosition");
assert_eq!(decoded.value, "EDAWeaponModulePosition::FrontWeapon");
} }
} }