test configurations
This commit is contained in:
@@ -108,19 +108,21 @@ impl ToString for Sprite {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sprite_from_string() {
|
||||
let output = Sprite::from(include_str!("test-resources/sprite").to_string());
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::mock;
|
||||
use crate::sprite::Sprite;
|
||||
|
||||
let expected = crate::mock::sprite();
|
||||
#[test]
|
||||
fn test_sprite_from_string() {
|
||||
let output = Sprite::from(include_str!("test-resources/sprite").to_string());
|
||||
let expected = mock::sprite();
|
||||
|
||||
assert_eq!(output, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sprite_to_string() {
|
||||
assert_eq!(
|
||||
crate::mock::sprite().to_string(),
|
||||
include_str!("test-resources/sprite").to_string()
|
||||
);
|
||||
assert_eq!(output, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sprite_to_string() {
|
||||
assert_eq!(mock::sprite().to_string(), include_str!("test-resources/sprite").to_string());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user