Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from evernym/library
Browse files Browse the repository at this point in the history
Converted to a library and added unit test
  • Loading branch information
glowkey authored Sep 20, 2017
2 parents c927757 + 807e614 commit 8e77791
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions watermark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ name = "watermark"
version = "0.0.1"
authors = [ "Mark Hadley <mark.hadley@evernym.com>" ]

[lib]
name = "cxs"
path = "src/lib.rs"
11 changes: 11 additions & 0 deletions watermark/src/lib.rs
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));}
}
3 changes: 0 additions & 3 deletions watermark/src/main.rs

This file was deleted.

0 comments on commit 8e77791

Please sign in to comment.