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
//! External-context check for the `KTSTR_TESTS` distributed
//! slice.
//!
//! The `#[ktstr_test]` macro has been covered by every integration
//! test that uses it — if the macro emission broke, the whole suite
//! would fail to compile or link. This file covers the complementary
//! surface: the *manual* `#[distributed_slice]` path documented at
//! `test_support::KTSTR_TESTS`, for downstream crates that
//! programmatically populate entries without going through the
//! macro.
//!
//! Manual registration depends on `ktstr::__private::linkme` being
//! re-exported at the crate root so consumers can spell the
//! `distributed_slice` attribute. If that re-export disappears or
//! the path changes, this file fails to compile. At runtime, the
//! framework's `--list` protocol must surface the manually-registered
//! entry under its declared name; nextest discovery proves that by
//! listing the entry below as a runnable test.
//!
//! No standalone `#[test]` assertions live here: once a binary holds
//! any real `#[ktstr_test]` entry, `test_support::ktstr_main`
//! intercepts nextest's `--list` and hides plain `#[test]`
//! functions. The registration proof is in the entry's presence in
//! the nextest list, not in a separate assertion.
use Result;
use AssertResult;
use Ctx;
use KtstrTestEntry;
/// Manual `#[distributed_slice]` registration reachable through
/// `ktstr::__private::linkme`. If nextest `--list` for this binary
/// does not emit `ktstr::distributed_slice_registration
/// ktstr/external_context_marker`, the manual-registration surface
/// regressed — the macro expansion still works but programmatic
/// test generation has silently broken.
static EXTERNAL_CONTEXT_MARKER: KtstrTestEntry = KtstrTestEntry ;