mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-23 19:29:48 +02:00
🎨 Move replays to the project root
This commit is contained in:
1 parent
12aa208217
commit
0f437c39de
11 files changed
+12
-13
No files matched your search
@@ -6,7 +6,7 @@ use wotbreplay_parser::replay::Replay;
|
||||
|
||||
#[test]
|
||||
fn player_results_ok() -> Result<()> {
|
||||
let battle_results_dat = Replay::open(File::open("tests/replays/player_results.wotbreplay")?)?
|
||||
let battle_results_dat = Replay::open(File::open("replays/player_results.wotbreplay")?)?
|
||||
.read_battle_results_dat()?;
|
||||
assert_eq!(battle_results_dat.arena_unique_id, 1661909200500084);
|
||||
let battle_results: BattleResults = battle_results_dat.try_into()?;
|
||||
@@ -80,8 +80,8 @@ fn player_results_ok() -> Result<()> {
|
||||
|
||||
#[test]
|
||||
fn player_info_ok() -> Result<()> {
|
||||
let battle_results = Replay::open(File::open("tests/replays/player_results.wotbreplay")?)?
|
||||
.read_battle_results()?;
|
||||
let battle_results =
|
||||
Replay::open(File::open("replays/player_results.wotbreplay")?)?.read_battle_results()?;
|
||||
|
||||
assert_eq!(battle_results.players[1].info.clan_tag.as_deref(), Some("AN0NY"));
|
||||
|
||||
@@ -103,8 +103,8 @@ fn player_info_ok() -> Result<()> {
|
||||
|
||||
#[test]
|
||||
fn victory_points_ok() -> Result<()> {
|
||||
let battle_results = Replay::open(File::open("tests/replays/victory_points.wotbreplay")?)?
|
||||
.read_battle_results()?;
|
||||
let battle_results =
|
||||
Replay::open(File::open("replays/victory_points.wotbreplay")?)?.read_battle_results()?;
|
||||
|
||||
assert_eq!(battle_results.player_results[1].info.victory_points_seized, 40);
|
||||
assert_eq!(battle_results.player_results[1].info.victory_points_earned, 40);
|
||||
@@ -120,7 +120,7 @@ fn victory_points_ok() -> Result<()> {
|
||||
|
||||
#[test]
|
||||
fn draw_ok() -> Result<()> {
|
||||
let battle_results = Replay::open(File::open("tests/replays/20230503_0027__helaas_pindakaas_A140_ASTRON_REX_105_2319058483532631656.wotbreplay")?)?
|
||||
let battle_results = Replay::open(File::open("replays/20230503_0027__helaas_pindakaas_A140_ASTRON_REX_105_2319058483532631656.wotbreplay")?)?
|
||||
.read_battle_results()?;
|
||||
assert_eq!(battle_results.winner_team_number, None);
|
||||
Ok(())
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@ use wotbreplay_parser::replay::Replay;
|
||||
#[test]
|
||||
fn parse_ok() -> Result<()> {
|
||||
let mut replay = Replay::open(File::open(
|
||||
"tests/replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
"replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
)?)?;
|
||||
let data = replay.read_data()?;
|
||||
|
||||
@@ -21,7 +21,7 @@ fn parse_ok() -> Result<()> {
|
||||
#[test]
|
||||
fn base_player_create_ok() -> Result<()> {
|
||||
let mut replay = Replay::open(File::open(
|
||||
"tests/replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
"replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
)?)?;
|
||||
let data = replay.read_data()?;
|
||||
|
||||
@@ -69,7 +69,7 @@ fn base_player_create_ok() -> Result<()> {
|
||||
#[test]
|
||||
fn update_arena_ok() -> Result<()> {
|
||||
let mut replay = Replay::open(File::open(
|
||||
"tests/replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
"replays/20230429_0126__helaas_pindakaas_A140_ASTRON_REX_105_16114615898101270.wotbreplay",
|
||||
)?)?;
|
||||
let data = replay.read_data()?;
|
||||
|
||||
@@ -97,7 +97,7 @@ fn update_arena_ok() -> Result<()> {
|
||||
|
||||
#[test]
|
||||
fn training_room_ok() -> Result<()> {
|
||||
let mut replay = Replay::open(File::open("tests/replays/training_room.wotbreplay")?)?;
|
||||
let mut replay = Replay::open(File::open("replays/training_room.wotbreplay")?)?;
|
||||
replay.read_data()?;
|
||||
Ok(())
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ use wotbreplay_parser::replay::Replay;
|
||||
|
||||
#[test]
|
||||
fn meta_ok() -> Result<()> {
|
||||
let meta = Replay::open(File::open("tests/replays/player_results.wotbreplay")?)?.read_meta()?;
|
||||
let meta = Replay::open(File::open("replays/player_results.wotbreplay")?)?.read_meta()?;
|
||||
|
||||
assert_eq!(meta.player_name, "zeekrab");
|
||||
assert_eq!(meta.arena_unique_id, "1661909200500084");
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
*.wotbreplay linguist-generated
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user