Skip to content

Commit

Permalink
test dropping skins
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed Feb 16, 2023
1 parent 888d3e6 commit b3743ac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/skin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,18 @@ pub struct AttachmentEntry {
pub slot_index: i32,
pub attachment: Attachment,
}

#[cfg(test)]
mod test {
use crate::test::TestAsset;

use super::*;

/// Check that dropped skins don't segfault.
#[test]
fn skin_drop() {
let (skeleton, _) = TestAsset::spineboy().instance();
drop(skeleton.data().default_skin());
drop(Skin::new("test"));
}
}

0 comments on commit b3743ac

Please sign in to comment.