etest_derive/
lib.rs

1use proc_macro::TokenStream;
2
3/// Function attribute to declare an "etest"
4///
5/// Supported parameters:
6///
7/// - `skip=<expr>`: when expression evaluates to `true`, test is skipped
8///
9/// - `skip_result=<expr>`: allows to set explicitly a return value when test is skipped
10///
11///
12/// - `uses=<literal>` or `uses=[<expr>, ...]`: specifies resources which are "used" (shared)
13///
14/// - `consumes=<literal>` or `consumes=[<expr>, ...]`: specifies resources
15///   which are "consumed" (exclusively)
16///
17/// - `no_default_uses`: removes basic resources from the "uses" list
18///
19/// - `notparallel`: consumes basic resources so that test is not run with other ones
20///
21///
22/// - `timeout=<expr>`: test panics after the given time when not finished
23///
24/// See etest crate documentation for details.
25#[proc_macro_attribute]
26pub fn etest(attr: TokenStream, item: TokenStream) -> TokenStream {
27    etest_impl::etest(attr, item)
28}