Fix tests

This commit is contained in:
Lol3rrr
2024-10-16 16:36:51 +02:00
parent fee7e1172c
commit c195657eaf
2 changed files with 7 additions and 9 deletions

View File

@@ -104,14 +104,6 @@ pub fn parse(buf: &[u8]) -> Result<PerRound, ()> {
}
}
let total_rounds_played = state
.get_prop("CCSGameRulesProxy.CCSGameRules.m_totalRoundsPlayed")
.map(|v| v.value.as_i32())
.flatten();
if let Some(total_rounds_played) = total_rounds_played {
debug_assert_eq!(total_rounds_played, rounds.len() as i32);
}
if state.class.as_ref() == "CCSGameRulesProxy" {
let round_win_reason = state
.get_prop("CCSGameRulesProxy.CCSGameRules.m_eRoundWinReason")

View File

@@ -11,7 +11,13 @@ fn endofgame_nuke() {
let expected = endofgame::EndOfGame {
map: "de_nuke".to_owned(),
teams: [].into_iter().collect(),
teams: [(2, endofgame::TeamInfo {
end_score: 13,
start_side: "CT".into(),
}), (3, endofgame::TeamInfo {
end_score: 8,
start_side: "TERRORIST".into()
})].into_iter().collect(),
players: vec![
(
endofgame::PlayerInfo {