From: George Burton Date: Thu, 10 Aug 2017 22:30:33 +0000 (+0100) Subject: Add a placeholder assertion in the new lib project template X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~7^2~17^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7016687b6ec926a3bca0b321b1c6ce4c30089281;p=cargo.git Add a placeholder assertion in the new lib project template --- diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index 75586486b..45eb94133 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -507,7 +507,9 @@ fn main() { #[cfg(test)] mod tests { #[test] - fn it_works() {} + fn it_works() { + assert_eq!(2 + 2, 4); + } } " }; diff --git a/tests/new.rs b/tests/new.rs index 9e833712a..835ad1c02 100644 --- a/tests/new.rs +++ b/tests/new.rs @@ -38,7 +38,9 @@ fn simple_lib() { assert_eq!(contents, r#"#[cfg(test)] mod tests { #[test] - fn it_works() {} + fn it_works() { + assert_eq!(2 + 2, 4); + } } "#);