Adding tests to test mod

This commit is contained in:
Daniel Tomlinson
2020-11-23 11:15:00 +00:00
parent e9f7188c1c
commit fd79228199

View File

@@ -8,6 +8,9 @@ pub fn handify(input: &str) -> String {
input input
} }
#[cfg(test)]
mod test {
use super::*;
#[test] #[test]
fn handify_test_no_trailing_spaces() { fn handify_test_no_trailing_spaces() {
let input = "hello world"; let input = "hello world";
@@ -25,3 +28,4 @@ fn handify_test_empty_string() {
let input = ""; let input = "";
assert_eq!(handify(input), ""); assert_eq!(handify(input), "");
} }
}