Skip to content

Commit 237af04

Browse files
committed
Add: Test collector
Failing tests remain unchanged: failures: pass pass_args pass_expect_expanded pass_expect_expanded_args pr61 Signed-off-by: Mark Van de Vyver <[email protected]>
1 parent 95420d5 commit 237af04

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

test-virtual/wrkspc-test/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ default = []
1010

1111
test-feature = []
1212

13+
[dependencies]
14+
inventory = "0.2.2"
15+
1316
[dev-dependencies]
1417
macrotest = { path = "../../" }
15-
inventory = "0.2.2"
1618

1719
[[test]]
1820
name = "workspace-tests"

test-virtual/wrkspc-test/src/main.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
pub mod tests;
2+
13
fn setup() {
2-
println!("Setup")
4+
println!("Setup")
35
}
46

57
fn teardown() {
6-
println!("Teardown")
8+
println!("Teardown")
79
}
810
fn main() {
9-
// Setup test environment
10-
setup();
11+
// Setup test environment
12+
setup();
1113

12-
// TODO: Run the test
14+
// TODO: Run the test
1315

14-
// Teardown test environment
15-
teardown();
16+
// Teardown test environment
17+
teardown();
1618
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#[derive(Debug)]
2+
pub struct IntegrationTest {
3+
pub name: &'static str,
4+
pub test_fn: fn(),
5+
}
6+
7+
inventory::collect!(IntegrationTest);

0 commit comments

Comments
 (0)