1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
pub fn one() -> String { "one".to_owned() } pub fn two() -> String { format!("{}", 2) } #[cfg(test)] mod test_super { use super::*; #[test] fn test_one() { assert_eq!(one(), "one"); } #[test] fn test_two() { assert_eq!(two(), "2"); } }