libtest2_harness/lib.rs
1//! An experimental replacement for the core of libtest
2//!
3//! # Usage
4//!
5//! To use this, you most likely want to add a manual `[[test]]` section to
6//! `Cargo.toml` and set `harness = false`. For example:
7//!
8//! ```toml
9//! [[test]]
10//! name = "mytest"
11//! path = "tests/mytest.rs"
12//! harness = false
13//! ```
14//!
15//! And in `tests/mytest.rs` you would call [`Harness::main`] in the `main` function:
16//!
17//! ```no_run
18//! libtest2_harness::Harness::with_env()
19//! .main();
20//! ```
21//!
22
23#![cfg_attr(docsrs, feature(doc_auto_cfg))]
24// #![warn(clippy::print_stderr)]
25// #![warn(clippy::print_stdout)]
26#![allow(clippy::todo)]
27
28mod case;
29mod harness;
30mod notify;
31mod state;
32
33pub mod cli;
34
35pub use case::*;
36pub use harness::*;
37pub use notify::RunMode;
38pub use state::*;
39
40#[doc = include_str!("../README.md")]
41#[cfg(doctest)]
42pub struct ReadmeDoctests;