test configurations
This commit is contained in:
@@ -29,15 +29,20 @@ impl ToString for Position {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_position_from_string() {
|
||||
assert_eq!(
|
||||
Position::from("4,12".to_string()).unwrap(),
|
||||
Position { x: 4, y: 12 }
|
||||
);
|
||||
}
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::position::Position;
|
||||
|
||||
#[test]
|
||||
fn test_position_to_string() {
|
||||
assert_eq!(Position { x: 4, y: 12 }.to_string(), "4,12".to_string())
|
||||
#[test]
|
||||
fn test_position_from_string() {
|
||||
assert_eq!(
|
||||
Position::from("4,12".to_string()).unwrap(),
|
||||
Position { x: 4, y: 12 }
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_position_to_string() {
|
||||
assert_eq!(Position { x: 4, y: 12 }.to_string(), "4,12".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user