Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/libtest2/src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#[macro_export]
#[doc(hidden)]
macro_rules! _main_parse {
(#[main] $(#[$meta:meta])* fn main $($item:tt)*) => {
static TESTS: $crate::_private::DistributedList<$crate::_private::DynCase> = $crate::_private::DistributedList::root();
Expand All @@ -14,6 +15,7 @@ macro_rules! _main_parse {
}

#[macro_export]
#[doc(hidden)]
#[allow(clippy::crate_in_macro_def)] // accessing item defined by `_main_parse`/`_parse_ignore`/`_run_test`, and recursively calling the macro itself
macro_rules! _test_parse {
// Entry point
Expand Down Expand Up @@ -133,6 +135,7 @@ macro_rules! _test_parse {
}

#[macro_export]
#[doc(hidden)]
macro_rules! _parse_ignore {
($context:expr, [$reason:literal] $(,)?) => {
$context.ignore_for($reason)?
Expand All @@ -144,6 +147,7 @@ macro_rules! _parse_ignore {
}

#[macro_export]
#[doc(hidden)]
macro_rules! _run_test {
($context:expr, [$expected:literal]) => {
$crate::panic::assert_panic_contains(|| run($context), $expected)
Expand Down