Add an integration test
This commit is contained in:
parent
60e8604567
commit
8805234257
2 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
pub fn add_two(a: usize) -> usize {
|
||||
a + 3
|
||||
a + 2
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
7
adder/tests/integration_test.rs
Normal file
7
adder/tests/integration_test.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
use adder::add_two;
|
||||
|
||||
#[test]
|
||||
fn it_adds_two() {
|
||||
let result = add_two(2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
Loading…
Reference in a new issue