diff --git a/src/image.rs b/src/image.rs index 0f88b25..002bbbc 100644 --- a/src/image.rs +++ b/src/image.rs @@ -1,5 +1,3 @@ -use crate::mock; - #[derive(Debug, Eq, PartialEq)] pub struct Image { pub pixels: Vec, // 64 for SD, 256 for HD @@ -61,7 +59,7 @@ fn test_image_from_string() { #[test] fn test_image_to_string() { - let output = mock::image::chequers_1().to_string(); + let output = crate::mock::image::chequers_1().to_string(); let expected = include_str!("test-resources/image-chequers-1").to_string(); assert_eq!(output, expected); } diff --git a/src/item.rs b/src/item.rs index 0b94ea0..9172ad6 100644 --- a/src/item.rs +++ b/src/item.rs @@ -1,4 +1,4 @@ -use crate::{AnimationFrames, Image, mock, from_base36, ToBase36, optional_data_line}; +use crate::{AnimationFrames, Image, from_base36, ToBase36, optional_data_line}; #[derive(Debug, Eq, PartialEq)] pub struct Item { @@ -75,13 +75,13 @@ impl ToString for Item { #[test] fn test_item_from_string() { let output = Item::from(include_str!("test-resources/item").to_string()); - let expected = mock::item(); + let expected = crate::mock::item(); assert_eq!(output, expected); } #[test] fn test_item_to_string() { - let output = mock::item().to_string(); + let output = crate::mock::item().to_string(); let expected = include_str!("test-resources/item").to_string(); assert_eq!(output, expected); } diff --git a/src/room.rs b/src/room.rs index ae78ca0..7faa69c 100644 --- a/src/room.rs +++ b/src/room.rs @@ -1,4 +1,4 @@ -use crate::{Exit, ExitInstance, Instance, mock, Position, from_base36, ToBase36, optional_data_line}; +use crate::{Exit, ExitInstance, Instance, Position, from_base36, ToBase36, optional_data_line}; #[derive(Debug, Eq, PartialEq)] pub struct Room { @@ -88,7 +88,7 @@ impl From for Room { fn test_room_from_string() { assert_eq!( Room::from(include_str!("test-resources/room").to_string()), - mock::room() + crate::mock::room() ); } @@ -146,5 +146,5 @@ impl ToString for Room { #[test] fn test_room_to_string() { - assert_eq!(mock::room().to_string(), include_str!("test-resources/room").to_string()); + assert_eq!(crate::mock::room().to_string(), include_str!("test-resources/room").to_string()); } diff --git a/src/sprite.rs b/src/sprite.rs index e6249a2..53aa36f 100644 --- a/src/sprite.rs +++ b/src/sprite.rs @@ -1,4 +1,4 @@ -use crate::{AnimationFrames, Image, Position, mock, from_base36, ToBase36, optional_data_line}; +use crate::{AnimationFrames, Image, Position, from_base36, ToBase36, optional_data_line}; #[derive(Debug, Eq, PartialEq)] pub struct Sprite { @@ -101,12 +101,15 @@ fn test_sprite_from_string() { include_str!("test-resources/sprite").to_string() ); - let expected = mock::sprite(); + let expected = crate::mock::sprite(); assert_eq!(output, expected); } #[test] fn test_sprite_to_string() { - assert_eq!(mock::sprite().to_string(), include_str!("test-resources/sprite").to_string()); + assert_eq!( + crate::mock::sprite().to_string(), + include_str!("test-resources/sprite").to_string() + ); } diff --git a/src/tile.rs b/src/tile.rs index ab78459..8d89878 100644 --- a/src/tile.rs +++ b/src/tile.rs @@ -1,6 +1,4 @@ -use crate::{AnimationFrames, from_base36, ToBase36, optional_data_line}; -use crate::image::Image; -use crate::mock; +use crate::{AnimationFrames, Image, from_base36, ToBase36, optional_data_line}; #[derive(Debug, Eq, PartialEq)] pub struct Tile { @@ -109,8 +107,8 @@ fn test_tile_to_string() { name: Some("chequers".to_string()), wall: None, animation_frames: vec![ - mock::image::chequers_1(), - mock::image::chequers_2(), + crate::mock::image::chequers_1(), + crate::mock::image::chequers_2(), ], colour_id: None }.to_string();