Browse Source

fix tests

presents
andy 4 years ago
parent
commit
c9160f177d
  1. 7
      src/entity/item/weapon.rs
  2. 15
      tests/test_bank.rs
  3. 4
      tests/test_item_pickup.rs
  4. 2
      tests/test_rooms.rs

7
src/entity/item/weapon.rs

@ -1599,13 +1599,6 @@ impl Weapon {
if data[4] & 0x40 == 0x40 {
p = WrappingPaper::from(data[5]);
}
// else if data[4] >= 0x01 && data[4] <= 0x28 {
// s = WeaponSpecial::from(data[4]);
// t = true;
// }
// else {
// return Err(ItemParseError::InvalidSpecial)
// }
let mut a = [
None,

15
tests/test_bank.rs

@ -27,6 +27,7 @@ async fn test_bank_items_sent_in_character_login() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -68,6 +69,7 @@ async fn test_request_bank_items() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -165,6 +167,7 @@ async fn test_request_bank_items_sorted() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -193,6 +196,7 @@ async fn test_request_bank_items_sorted() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -243,6 +247,7 @@ async fn test_deposit_individual_item() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -258,6 +263,7 @@ async fn test_deposit_individual_item() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -617,6 +623,7 @@ async fn test_deposit_individual_item_in_full_bank() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -635,6 +642,7 @@ async fn test_deposit_individual_item_in_full_bank() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -714,6 +722,7 @@ async fn test_deposit_stacked_item_in_full_bank() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -810,6 +819,7 @@ async fn test_deposit_stacked_item_in_full_bank_with_partial_stack() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -988,6 +998,7 @@ async fn test_withdraw_individual_item() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -1347,6 +1358,7 @@ async fn test_withdraw_individual_item_in_full_inventory() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Bank {
@ -1366,6 +1378,7 @@ async fn test_withdraw_individual_item_in_full_inventory() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -1441,6 +1454,7 @@ async fn test_withdraw_stacked_item_in_full_inventory() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -1523,6 +1537,7 @@ async fn test_withdraw_stacked_item_in_full_inventory_with_partial_stack() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {

4
tests/test_item_pickup.rs

@ -172,6 +172,7 @@ async fn test_pick_up_meseta_when_inventory_full() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -251,6 +252,7 @@ async fn test_pick_up_partial_stacked_item_when_inventory_is_otherwise_full() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -343,6 +345,7 @@ async fn test_can_not_pick_up_item_when_inventory_full() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -361,6 +364,7 @@ async fn test_can_not_pick_up_item_when_inventory_full() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {

2
tests/test_rooms.rs

@ -29,6 +29,7 @@ async fn test_item_ids_reset_when_rejoining_rooms() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {
@ -48,6 +49,7 @@ async fn test_item_ids_reset_when_rejoining_rooms() {
special: None,
attrs: [None, None, None],
tekked: true,
wrapping: None,
}
),
location: item::ItemLocation::Inventory {

Loading…
Cancel
Save