From 0e2aadf8f279f03a012c909ab1e0e1151838127f Mon Sep 17 00:00:00 2001 From: "Christopher J. McClellan" Date: Sun, 30 Dec 2018 19:55:24 -0500 Subject: [PATCH] Make sure we can actually test prod code --- examples/test_on_host.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/test_on_host.rs b/examples/test_on_host.rs index bb39de1..b5f386b 100644 --- a/examples/test_on_host.rs +++ b/examples/test_on_host.rs @@ -32,6 +32,10 @@ fn main() -> ! { } } +fn add(a: i32, b: i32) -> i32 { + a + b +} + #[cfg(test)] mod test { use super::*; @@ -39,6 +43,6 @@ mod test { #[test] fn foo() { println!("tests work!"); - assert!(1 == 1); + assert!(2 == add(1,1)); } }