Crates.io | test_deps |
lib.rs | test_deps |
version | 0.1.0 |
source | src |
created_at | 2021-05-20 07:12:52.620496 |
updated_at | 2021-05-20 07:12:52.620496 |
description | Allows developers to define dependencies among tests |
homepage | |
repository | https://github.com/nshou/test_deps |
max_upload_size | |
id | 399879 |
size | 51,028 |
test_deps
allows developers to define dependencies among tests.
// Serial
// A -> B -> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B: A)]
#[test]
fn test_b() {}
#[deps(C: B)]
#[test]
fn test_c() {}
// Fork
// A -+-> B
// `-> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B: A)]
#[test]
fn test_b() {}
#[deps(C: A)]
#[test]
fn test_c() {}
// Merge
// A --\
// B --+-> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B)]
#[test]
fn test_b() {}
#[deps(C: A B)]
#[test]
fn test_c() {}
Add
[dev-dependencies]
test_deps = "0.1"
to your Cargo.toml and add
use test_deps::deps;
to your test module.
See docs.rs.
MIT. See COPYING.