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

rename data folder

This commit is contained in:
Robin Appelman 2021-07-11 17:43:31 +02:00
commit 67a4ca5744
32 changed files with 19 additions and 19 deletions

View file

@ -6,7 +6,7 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/demostf/parser"
exclude = [ "tests/fuzz", "data" ]
exclude = [ "tests/fuzz", "test_data" ]
[lib]
name = "tf_demo_parser"

View file

@ -50,5 +50,5 @@ fn bench_all(input_file: &str, b: &mut Bencher) {
#[bench]
fn all_test_gully(b: &mut Bencher) {
bench_all("data/gully.dem", b);
bench_all("test_data/gully.dem", b);
}

View file

@ -20,10 +20,10 @@ fn bench_file(input_file: &str, b: &mut Bencher) {
#[bench]
fn bench_gully(b: &mut Bencher) {
bench_file("data/gully.dem", b);
bench_file("test_data/gully.dem", b);
}
#[bench]
fn bench_comp(b: &mut Bencher) {
bench_file("data/comp.dem", b);
bench_file("test_data/comp.dem", b);
}

View file

@ -23,7 +23,7 @@ impl MessageHandler for AllMessages {
}
fn bench_all() {
let file = fs::read("data/gully.dem").expect("Unable to read file");
let file = fs::read("test_data/gully.dem").expect("Unable to read file");
let demo = Demo::new(&file);
let stream = demo.get_stream();
black_box(

View file

@ -57,5 +57,5 @@ fn flatten_bench(input_file: &str, b: &mut Bencher) {
#[bench]
fn sendprop_test_gully(b: &mut Bencher) {
flatten_bench("data/gully.dem", b);
flatten_bench("test_data/gully.dem", b);
}

View file

@ -128,7 +128,7 @@ impl MessageHandler for EntityDumper {
}
}
#[test_case("data/small.dem", "data/small_entities.json"; "small.dem")]
#[test_case("test_data/small.dem", "test_data/small_entities.json"; "small.dem")]
fn entity_test(input_file: &str, snapshot_file: &str) {
let file = fs::read(input_file).expect("Unable to read file");
let demo = Demo::new(&file);

View file

@ -48,7 +48,7 @@ impl MessageHandler for SendPropAnalyser {
}
}
#[test_case("data/gully.dem", "data/gully_props.json"; "gully.dem")]
#[test_case("test_data/gully.dem", "test_data/gully_props.json"; "gully.dem")]
fn flatten_test(input_file: &str, snapshot_file: &str) {
let file = fs::read(input_file).expect("Unable to read file");
let demo = Demo::new(&file);

View file

@ -4,15 +4,15 @@ use test_case::test_case;
use tf_demo_parser::demo::parser::gamestateanalyser::{GameState, GameStateAnalyser};
use tf_demo_parser::{Demo, DemoParser, MatchState};
#[test_case("data/small.dem", "data/small.json"; "small.dem")]
#[test_case("data/gully.dem", "data/gully.json"; "gully.dem")]
#[test_case("data/comp.dem", "data/comp.json"; "comp.dem")]
#[test_case("data/malformed_cvar.dem", "data/malformed_cvar.json"; "malformed_cvar.dem")]
#[test_case("data/unicode-saytext.dem", "data/unicode-saytext.json"; "unicode-saytext.dem")]
#[test_case("data/nousers.dem", "data/nousers.json"; "nousers.dem")]
#[test_case("data/decal.dem", "data/decal.json"; "decal.dem")]
#[test_case("data/saytext2.dem", "data/saytext2.json"; "saytext2.dem")]
#[test_case("data/emptysaytext.dem", "data/emptysaytext.json"; "emptysaytext.dem")]
#[test_case("test_data/small.dem", "test_data/small.json"; "small.dem")]
#[test_case("test_data/gully.dem", "test_data/gully.json"; "gully.dem")]
#[test_case("test_data/comp.dem", "test_data/comp.json"; "comp.dem")]
#[test_case("test_data/malformed_cvar.dem", "test_data/malformed_cvar.json"; "malformed_cvar.dem")]
#[test_case("test_data/unicode-saytext.dem", "test_data/unicode-saytext.json"; "unicode-saytext.dem")]
#[test_case("test_data/nousers.dem", "test_data/nousers.json"; "nousers.dem")]
#[test_case("test_data/decal.dem", "test_data/decal.json"; "decal.dem")]
#[test_case("test_data/saytext2.dem", "test_data/saytext2.json"; "saytext2.dem")]
#[test_case("test_data/emptysaytext.dem", "test_data/emptysaytext.json"; "emptysaytext.dem")]
fn snapshot_test(input_file: &str, snapshot_file: &str) {
let file = fs::read(input_file).expect("Unable to read file");
let demo = Demo::new(&file);
@ -27,8 +27,8 @@ fn snapshot_test(input_file: &str, snapshot_file: &str) {
pretty_assertions::assert_eq!(expected, state);
}
#[test_case("data/small.dem", "data/small_game_state.json"; "small.dem")]
#[test_case("data/gully.dem", "data/gully_game_state.json"; "gully.dem")]
#[test_case("test_data/small.dem", "test_data/small_game_state.json"; "small.dem")]
#[test_case("test_data/gully.dem", "test_data/gully_game_state.json"; "gully.dem")]
fn game_state_test(input_file: &str, snapshot_file: &str) {
let file = fs::read(input_file).expect("Unable to read file");
let demo = Demo::new(&file);