1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
use Future;
use Pin;
use Arc;
/// A pinned, heap-allocated [`Future`] that is [`Send`] and bounded by lifetime `'a`.
///
/// This is the return type stored in [`TestCase::test_fn`],
/// [`GlobalSetupEntry::setup_fn`], and [`GlobalTeardownEntry::teardown_fn`].
/// You will not normally need to use it directly — the `#[testcase]`,
/// `#[global_setup]`, and `#[global_teardown]` proc macros generate the correct
/// wrappers automatically.
pub type BoxFuture<'a, T> = ;
/// Boxed error type returned from test functions, setup closures, and teardown
/// closures. Equivalent to `Box<dyn std::error::Error + Send + Sync>`.
pub type BoxError = ;
/// The concrete type of the function pointer stored in [`TestCase::test_fn`].
///
/// It accepts a shared [`TestContext`][crate::context::TestContext] and returns
/// a [`BoxFuture`] that resolves to `Ok(())` on success or an error on failure.
/// You will not normally construct values of this type directly.
pub type TestFn = fn ;
/// A single test case registered at compile time via `#[testcase]`.
///
/// The `#[testcase]` attribute macro fills all fields automatically from the
/// annotated function and its attribute arguments. You should not construct
/// `TestCase` values manually.
// linkme requires Sync
unsafe
/// A global setup function registered at compile time via `#[global_setup]`.
///
/// At most one entry may exist per test binary. The runtime calls [`setup_fn`]
/// once before running any tests, then uses [`serialize_fn`] to hand the state
/// to each test subprocess via an environment variable and [`deserialize_fn`]
/// to reconstruct it inside each subprocess.
///
/// [`setup_fn`]: GlobalSetupEntry::setup_fn
/// [`serialize_fn`]: GlobalSetupEntry::serialize_fn
/// [`deserialize_fn`]: GlobalSetupEntry::deserialize_fn
unsafe
/// A global teardown function registered at compile time via `#[global_teardown]`.
///
/// At most one entry may exist per test binary. The runtime calls [`teardown_fn`]
/// once after all tests have run, passing the state produced by `#[global_setup]`.
///
/// [`teardown_fn`]: GlobalTeardownEntry::teardown_fn
unsafe
/// All test cases discovered at compile time via `#[testcase]`.
///
/// Populated by [`linkme`] distributed slices; the coordinator iterates this
/// slice to build the list of tests to run.
pub static RIG_TEST_CASES: ;
/// At most one global setup entry, registered via `#[global_setup]`.
///
/// The runtime asserts at startup that this slice contains zero or one element.
pub static RIG_GLOBAL_SETUP: ;
/// At most one global teardown entry, registered via `#[global_teardown]`.
///
/// The runtime asserts at startup that this slice contains zero or one element.
pub static RIG_GLOBAL_TEARDOWN: ;
/// An HTTP client configurator registered at compile time via
/// `#[rigtest::main(http_client = fn_name)]`.
///
/// At most one entry may exist per test binary. When present, the runtime calls
/// [`configure_fn`] with a fresh [`reqwest::ClientBuilder`] before each test
/// subprocess runs, and uses the returned builder to construct `ctx.client`.
///
/// [`configure_fn`]: HttpClientConfiguratorEntry::configure_fn
unsafe
/// At most one HTTP client configurator, registered via
/// `#[rigtest::main(http_client = fn_name)]`.
///
/// The runtime asserts at startup that this slice contains zero or one element.
pub static RIG_HTTP_CLIENT_CONFIGURATOR: ;