From 68de2504e02afbd937d3f6eb014a0b028034ffad Mon Sep 17 00:00:00 2001 From: andy Date: Sat, 18 Jun 2022 00:13:11 +0000 Subject: [PATCH] fix drop test --- src/ship/drops/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ship/drops/mod.rs b/src/ship/drops/mod.rs index 7df1a05..a5a9268 100644 --- a/src/ship/drops/mod.rs +++ b/src/ship/drops/mod.rs @@ -213,6 +213,10 @@ mod test { #[test] fn test_sjs_drop() { let mut drop_table = DropTable::::new(Episode::Two, Difficulty::Ultimate, SectionID::Skyly); - let drop = drop_table.get_rare_drop(&MapArea::Seaside, &MonsterType::GiGue); + let drop = drop_table.get_rare_drop(&MapArea::Seaside, &MonsterType::GiGue).unwrap(); + if let ItemDropType::Weapon(weapon) = drop { + assert!(weapon.weapon == weapon::WeaponType::SealedJSword); + assert!(weapon.kills == Some(0)); + } } }