1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 18:24:05 +02:00

update tests

This commit is contained in:
Robin Appelman 2025-02-19 19:30:31 +01:00
commit 43c9021ba2
5 changed files with 5300 additions and 31 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -30,9 +30,12 @@ fn snapshot_test(input_file: &str) {
fn game_state_test(input_file: &str) {
let file = fs::read(format!("test_data/{}", input_file)).expect("Unable to read file");
let demo = Demo::new(&file);
let (_, state) = DemoParser::new_with_analyser(demo.get_stream(), GameStateAnalyser::new())
let (_, mut state) = DemoParser::new_with_analyser(demo.get_stream(), GameStateAnalyser::new())
.parse()
.unwrap();
state.events.clear();
insta::assert_json_snapshot!(input_file, state);
insta::with_settings!({sort_maps => true}, {
insta::assert_json_snapshot!(input_file, state);
});
}