Skip to main content

Module unit_tests

Module unit_tests 

Source
Expand description

Tidy check to ensure #[test] and #[bench] are not used directly inside of the standard library.

core and alloc cannot be tested directly due to duplicating lang items. All tests and benchmarks must be written externally in {coretests,alloctests}/{tests,benches}.

Outside of the standard library, tests and benchmarks should be outlined into separate files named tests.rs or benches.rs, or directories named tests or benches unconfigured during normal build.

Re-exportsยง

use std::path::Path; ๐Ÿ”’
use crate::diagnostics::CheckId; ๐Ÿ”’
use crate::diagnostics::TidyCtx; ๐Ÿ”’
use crate::walk::filter_dirs; ๐Ÿ”’
use crate::walk::walk; ๐Ÿ”’

Functionsยง

check