()
| 32 | |
| 33 | #[tokio::test] |
| 34 | async fn parse_example_workspace() -> anyhow::Result<()> { |
| 35 | let workspace = run_workspace_parsing( |
| 36 | concat!(env!("CARGO_MANIFEST_DIR"), "/tests/example-workspace"), |
| 37 | Workspace { |
| 38 | packages: vec![ |
| 39 | Package { |
| 40 | name: "main-one".into(), |
| 41 | version: "0.1.0".into(), |
| 42 | root_dir: concat!( |
| 43 | env!("CARGO_MANIFEST_DIR"), |
| 44 | "/tests/example-workspace/main-one" |
| 45 | ) |
| 46 | .into(), |
| 47 | dependencies: vec![Dependency { |
| 48 | name: "quick-sort".into(), |
| 49 | default_features: true, |
| 50 | features: vec![], |
| 51 | root_dir: concat!( |
| 52 | env!("CARGO_MANIFEST_DIR"), |
| 53 | "/tests/example-workspace/quick-sort" |
| 54 | ) |
| 55 | .into(), |
| 56 | }], |
| 57 | binaries: vec![ |
| 58 | Binary { |
| 59 | name: "main-one".into(), |
| 60 | src_path: concat!( |
| 61 | env!("CARGO_MANIFEST_DIR"), |
| 62 | "/tests/example-workspace/main-one/src/main.rs" |
| 63 | ) |
| 64 | .into(), |
| 65 | required_features: vec![], |
| 66 | }, |
| 67 | Binary { |
| 68 | name: "another_main".into(), |
| 69 | src_path: concat!( |
| 70 | env!("CARGO_MANIFEST_DIR"), |
| 71 | "/tests/example-workspace/main-one/src/bin/another_main.rs" |
| 72 | ) |
| 73 | .into(), |
| 74 | required_features: vec![], |
| 75 | }, |
| 76 | ], |
| 77 | tests: vec![Test { |
| 78 | name: "simple_tests".into(), |
| 79 | src_path: concat!( |
| 80 | env!("CARGO_MANIFEST_DIR"), |
| 81 | "/tests/example-workspace/main-one/tests/simple_tests.rs" |
| 82 | ) |
| 83 | .into(), |
| 84 | required_features: vec![], |
| 85 | }], |
| 86 | examples: vec![Example { |
| 87 | name: "demo".into(), |
| 88 | src_path: concat!( |
| 89 | env!("CARGO_MANIFEST_DIR"), |
| 90 | "/tests/example-workspace/main-one/examples/demo.rs" |
| 91 | ) |
nothing calls this directly
no test coverage detected