Crate sweet_test

Source
Expand description

§Sweet Test

A pretty cross platform test runner.

§Usage

#![cfg_attr(test, feature(test, custom_test_frameworks))]
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
use sweet_test::prelude::*;

#[test]
fn it_passes(){
	assert!(1 + 1 == 2);
	expect("sweet").not().to_contain("verbose matchers");
}
cargo test

Re-exports§

pub use sweet_test_macros;

Modules§

backtrace
libtest
Utilities for libtest
logging
Cross platform logging utils
matchers
Matchers used for assertions: expect(true).to_be_true()
prelude
test_case
test_runner
Test runner module
utils

Macros§

scoped_thread_local
no_std polyfill for scoped_tls.

Functions§

test_runner
Entry point for the sweet test runner

Attribute Macros§

test
A unified macro for handling all test cases: