test configurations
This commit is contained in:
@@ -30,25 +30,29 @@ impl ToString for Ending {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ending_from_string() {
|
||||
assert_eq!(
|
||||
Ending::from(include_str!("test-resources/ending").to_string()),
|
||||
Ending {
|
||||
id: "a".to_string(),
|
||||
dialogue: "This is a long line of dialogue. Blah blah blah".to_string()
|
||||
}
|
||||
);
|
||||
}
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::ending::Ending;
|
||||
|
||||
#[test]
|
||||
fn test_ending_to_string() {
|
||||
assert_eq!(
|
||||
Ending {
|
||||
id: "7".to_string(),
|
||||
dialogue: "This is another long ending. So long, farewell, etc.".to_string()
|
||||
}
|
||||
.to_string(),
|
||||
"END 7\nThis is another long ending. So long, farewell, etc.".to_string()
|
||||
);
|
||||
#[test]
|
||||
fn test_ending_from_string() {
|
||||
assert_eq!(
|
||||
Ending::from(include_str!("test-resources/ending").to_string()),
|
||||
Ending {
|
||||
id: "a".to_string(),
|
||||
dialogue: "This is a long line of dialogue. Blah blah blah".to_string()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ending_to_string() {
|
||||
assert_eq!(
|
||||
Ending {
|
||||
id: "7".to_string(),
|
||||
dialogue: "This is another long ending. So long, farewell, etc.".to_string()
|
||||
}.to_string(),
|
||||
"END 7\nThis is another long ending. So long, farewell, etc.".to_string()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user