1 2 3 4 5 6 7 8 9 10 11
pub fn add(a:i32, b:i32) ->i32 { return a+b; } #[cfg(test)] #[test] fn test_add() { let c = add(1,2); assert_eq!(c, 3); }