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

strictly distinguish between server and demo ticks

This commit is contained in:
Robin Appelman 2022-09-17 15:31:32 +02:00
commit 28de17a67c
34 changed files with 14232 additions and 1033 deletions

View file

@ -18,6 +18,12 @@ fn snapshot_test(input_file: &str, snapshot_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(demo.get_stream()).parse().unwrap();
//
// fs::write(
// format!("test_data/{}", snapshot_file),
// serde_json::to_string_pretty(&state).unwrap(),
// )
// .unwrap();
let expected: MatchState = serde_json::from_slice(
fs::read(format!("test_data/{}", snapshot_file))