New: add winning_team

This commit is contained in:
eigenein committed 2022-12-06 19:08:56 +01:00
1 parent 8d45bb28ed
commit 93cea446f5
4 files changed
+17 -4

No files matched your search

+11
View File
@@ -1,6 +1,7 @@
use std::fs::File;
use anyhow::Result;
use wotbreplay_parser::models::TeamNumber;
use wotbreplay_parser::Replay;
#[test]
@@ -94,3 +95,13 @@ fn victory_points_ok() -> Result<()> {
Ok(())
}
#[test]
fn winning_team_ok() -> Result<()> {
let battle_results = Replay::open(File::open("tests/replays/winning_team.wotbreplay")?)?
.read_battle_results()?;
assert_eq!(battle_results.winning_team(), TeamNumber::One);
Ok(())
}
Binary file not shown.