Make sure we can actually test prod code
This commit is contained in:
@@ -32,6 +32,10 @@ fn main() -> ! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn add(a: i32, b: i32) -> i32 {
|
||||||
|
a + b
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
@@ -39,6 +43,6 @@ mod test {
|
|||||||
#[test]
|
#[test]
|
||||||
fn foo() {
|
fn foo() {
|
||||||
println!("tests work!");
|
println!("tests work!");
|
||||||
assert!(1 == 1);
|
assert!(2 == add(1,1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user