Add a placeholder assertion in the new lib project template
authorGeorge Burton <burtonageo@gmail.com>
Thu, 10 Aug 2017 22:30:33 +0000 (23:30 +0100)
committerGeorge Burton <burtonageo@gmail.com>
Thu, 10 Aug 2017 22:30:33 +0000 (23:30 +0100)
src/cargo/ops/cargo_new.rs
tests/new.rs

index 75586486b52abf4005dfd4abe07a94354ee55355..45eb941330daba255ecb064e03c9cd11c72f2708 100644 (file)
@@ -507,7 +507,9 @@ fn main() {
 #[cfg(test)]
 mod tests {
     #[test]
-    fn it_works() {}
+    fn it_works() {
+        assert_eq!(2 + 2, 4);
+    }
 }
 "
         };
index 9e833712adc7f3084988d98ee0f41d803eca61e5..835ad1c0255b7f4ad420b0e1775b2a66ddc304f3 100644 (file)
@@ -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);
+    }
 }
 "#);