This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from evernym/library
Converted to a library and added unit test
- Loading branch information
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pub fn sum(x: i32, y: i32) -> i32{ | ||
let s = x + y; | ||
s | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use sum; | ||
#[test] | ||
fn test() {assert_eq!(3, sum(2,1));} | ||
} |
This file was deleted.
Oops, something went wrong.