Add inferno test demo

This commit is contained in:
Lol3rrr
2024-09-29 13:15:00 +02:00
parent 83b4a24b15
commit a5716e11dc
2 changed files with 19 additions and 6 deletions

View File

@@ -11,12 +11,22 @@ fn heatmap_nuke() {
let config = heatmap::Config { cell_size: 5.0 };
let (result, players) = heatmap::parse(&config, &input_bytes).unwrap();
for (user, mut heatmap) in result {
heatmap.shrink();
let image = heatmap.as_image();
image.save_with_format(format!("./heatmap_nuke-{}.png", user.0), image::ImageFormat::Png).unwrap();
}
assert_eq!(result.len(), players.len());
todo!()
}
#[test]
#[traced_test]
fn heatmap_inferno() {
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../testfiles/inferno.dem");
dbg!(path);
let input_bytes = std::fs::read(path).unwrap();
let config = heatmap::Config { cell_size: 5.0 };
let (result, players) = heatmap::parse(&config, &input_bytes).unwrap();
assert_eq!(result.len(), players.len());
todo!()
}