add a sample

This commit is contained in:
olivia 2018-04-26 22:14:20 +02:00
parent 3ffefa32e1
commit 7148233950
1 changed files with 18 additions and 5 deletions

View File

@ -1,7 +1,20 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
#[allow(dead_code)]
mod about_variables {
pub fn guess_this () -> i32 {
let one = 5;
let two = 7;
let three = 3;
let result = (one + two) / three;
result
}
}
#[cfg(test)]
mod tests {
use super::about_variables::*;
#[test]
fn test_complicated () {
assert_eq!(___, guess_this());
}
}