mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-08 08:07:53 -10:00
Native mods: the items test follows getFreeSlot's empty off hand
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b070f41dda
commit
396f456556
1 file changed
+3
-7
@@ -612,18 +612,14 @@ mod tests {
|
||||
let mut off = None;
|
||||
assert_eq!(
|
||||
room_in(&slots(&mut inv, &mut off), "minecraft:diamond", 64),
|
||||
4 + 64 + 64
|
||||
4 + 64
|
||||
);
|
||||
assert_eq!(
|
||||
add_to(slots(&mut inv, &mut off), 0, "minecraft:diamond", 64, 200),
|
||||
132
|
||||
68
|
||||
);
|
||||
assert_eq!(inv[3].as_ref().unwrap().count, 64, "onto its stack first");
|
||||
assert_eq!(
|
||||
off.as_ref().unwrap().count,
|
||||
64,
|
||||
"then the off hand, as Inventory.add"
|
||||
);
|
||||
assert!(off.is_none(), "never into an empty off hand (getFreeSlot)");
|
||||
assert_eq!(inv[9].as_ref().unwrap().count, 64);
|
||||
assert_eq!(
|
||||
room_in(&slots(&mut inv, &mut off), "minecraft:diamond", 64),
|
||||
|
||||
Reference in new issue
Block a user