Last active
January 24, 2019 22:22
-
-
Save yamafaktory/4dd74fa2d986043e6015fa29c7ca87b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn minus_one(number: i32) -> i32 { | |
number - 1 | |
} | |
#[cfg(test)] | |
mod tests { | |
use super::*; | |
#[test] | |
fn test_minus_one() { | |
assert_eq!(minus_one(1), 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment