Browse Source

fix a few warnings in tests

pull/141/head
jake 1 year ago
parent
commit
5fc23cd7ca
  1. 2
      tests/common.rs
  2. 2
      tests/test_bank.rs
  3. 6
      tests/test_character.rs
  4. 2
      tests/test_exp_gain.rs
  5. 2
      tests/test_item_actions.rs
  6. 2
      tests/test_item_drop.rs
  7. 2
      tests/test_item_id.rs
  8. 2
      tests/test_item_pickup.rs
  9. 2
      tests/test_item_use.rs
  10. 2
      tests/test_mags.rs
  11. 3
      tests/test_rooms.rs
  12. 2
      tests/test_shops.rs
  13. 2
      tests/test_trade.rs

2
tests/common.rs

@ -77,7 +77,7 @@ pub fn standard_ship<EG: EntityGateway + Clone>(gateway: EG) -> ShipServerState
}
//TODO: remove kb_conf_preset
pub async fn new_user_character<EG: EntityGateway + Clone>(entity_gateway: &mut EG, username: &str, password: &str, kb_conf_preset: usize) -> (UserAccountEntity, CharacterEntity) {
pub async fn new_user_character<EG: EntityGateway + Clone>(entity_gateway: &mut EG, username: &str, password: &str, _kb_conf_preset: usize) -> (UserAccountEntity, CharacterEntity) {
let new_user = NewUserAccountEntity {
email: format!("{}@pso.com", username),
username: username.into(),

2
tests/test_bank.rs

@ -2,7 +2,7 @@ use std::collections::BTreeSet;
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket};
use elseware::ship::ship::{RecvShipPacket, SendShipPacket};
use shops::StandardItemShops;
use libpso::packet::ship::*;

6
tests/test_character.rs

@ -1,8 +1,8 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use libpso::character::settings::{DEFAULT_KEYBOARD_CONFIG1, DEFAULT_KEYBOARD_CONFIG2, DEFAULT_KEYBOARD_CONFIG3, DEFAULT_KEYBOARD_CONFIG4};
use libpso::character::settings::{DEFAULT_KEYBOARD_CONFIG1, DEFAULT_KEYBOARD_CONFIG4};
use libpso::packet::ship::*;
#[path = "common.rs"]
@ -33,7 +33,7 @@ async fn test_save_options() {
async fn test_change_keyboard_mappings() {
let mut entity_gateway = InMemoryGateway::default();
let (user1, char1) = new_user_character(&mut entity_gateway, "a1", "a", 2).await;
let (user1, _char1) = new_user_character(&mut entity_gateway, "a1", "a", 2).await;
let mut ship = standard_ship(entity_gateway.clone());
log_in_char(&mut ship, ClientId(1), "a1", "a").await;

2
tests/test_exp_gain.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use stats::leveltable::CharacterLevelTable;
use elseware::ship::ship::{ShipServerState, SendShipPacket, RecvShipPacket};
use elseware::ship::ship::{SendShipPacket, RecvShipPacket};
use maps::variant::{MapVariant, MapVariantMode};
use maps::maps::Maps;
use maps::area::MapArea;

2
tests/test_item_actions.rs

@ -1,6 +1,6 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use entity::item;
use libpso::packet::ship::*;

2
tests/test_item_drop.rs

@ -1,6 +1,6 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::InMemoryGateway;
use elseware::ship::ship::{ShipServerState, SendShipPacket, RecvShipPacket};
use elseware::ship::ship::{SendShipPacket, RecvShipPacket};
use maps::monster::MonsterType;
use drops::{StandardDropTable, MonsterDropStats, MonsterDropType};
use drops::rare_drop_table::{RareDropTable, RareDropRate, RareDropItem};

2
tests/test_item_id.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use libpso::packet::ship::*;
use libpso::packet::messages::*;

2
tests/test_item_pickup.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use libpso::packet::ship::*;
use libpso::packet::messages::*;

2
tests/test_item_use.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use entity::character::TechLevel;
use libpso::packet::ship::*;

2
tests/test_mags.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::ship::RecvShipPacket;
use entity::character::{CharacterClass, SectionID};
use libpso::packet::ship::*;

3
tests/test_rooms.rs

@ -1,6 +1,6 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket};
use elseware::ship::ship::{RecvShipPacket, SendShipPacket};
use libpso::packet::ship::*;
//use libpso::packet::messages::*;
@ -16,7 +16,6 @@ async fn test_set_valid_quest_group() {
let (_user1, _char1) = new_user_character(&mut entity_gateway, "a1", "a", 1).await;
let mut ship = standard_ship_buildable(entity_gateway.clone())
.standard_quest_builder(Box::new(quests::load_standard_quests))
.government_quest_builder(Box::new(quests::load_government_quests))
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;

2
tests/test_shops.rs

@ -1,7 +1,7 @@
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket};
use elseware::ship::ship::{RecvShipPacket, SendShipPacket};
use maps::room::Difficulty;
use items::state::ItemStateError;
use shops::StandardItemShops;

2
tests/test_trade.rs

@ -2,7 +2,7 @@ use std::convert::TryInto;
use networking::serverstate::{ClientId, ServerState};
use entity::gateway::{EntityGateway, InMemoryGateway};
use entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket, ShipError};
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket};
use entity::item::{Meseta, ItemEntity, InventoryItemEntity};
use elseware::ship::packet::handler::trade::TradeError;

Loading…
Cancel
Save