1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-21 20:27:46 +00:00

Add invalid data test for PreBoneDeformer

This commit is contained in:
Joshua Goins 2024-04-16 22:06:27 -04:00
parent 11b554ef80
commit 54c08dbdcb

View file

@ -142,3 +142,22 @@ impl PreBoneDeformer {
}) })
} }
} }
#[cfg(test)]
mod tests {
use std::fs::read;
use std::path::PathBuf;
use super::*;
#[test]
fn test_invalid() {
let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
d.push("resources/tests");
d.push("random");
// Feeding it invalid data should not panic
PreBoneDeformer::from_existing(&read(d).unwrap());
}
}