test configurations

This commit is contained in:
2020-04-19 08:13:55 +01:00
parent d0614b6de2
commit 76e6c2477c
15 changed files with 515 additions and 451 deletions

View File

@@ -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());
}
}