()
| 24 | |
| 25 | #[test] |
| 26 | fn it_finds_errors() -> Result<()> { |
| 27 | let project = Project::new("foo", true)?; |
| 28 | |
| 29 | let mut src = fs::read_to_string(project.root().join("src/lib.rs"))?; |
| 30 | write!(&mut src, "\n\nfn foo() -> String {{\n \"foo\"\n}}\n")?; |
| 31 | |
| 32 | fs::write(project.root().join("src/lib.rs"), src)?; |
| 33 | |
| 34 | project |
| 35 | .cargo_component(["check"]) |
| 36 | .assert() |
| 37 | .stderr(contains("Checking foo v0.1.0").and(contains("expected `String`, found `&str`"))) |
| 38 | .failure(); |
| 39 | |
| 40 | Ok(()) |
| 41 | } |
| 42 | |
| 43 | #[test] |
| 44 | fn it_checks_a_workspace() -> Result<()> { |
nothing calls this directly
no test coverage detected