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
//! `djogi::cache` re-export module tests.
//!
//! Pins the surface at the type level: every test compiles a value of
//! the re-exported type to prove the symbol is reachable through
//! `djogi::cache::*` without an explicit `sassi` dep on the consumer
//! side. The auto-emitted `Cacheable` impl from `#[derive(Model)]`
//! does NOT exist yet, so the tests hand-roll a
//! minimal `Cacheable` impl on a tiny test type instead of leaning on
//! `#[model]`.
//!
//! Spec anchor: `Plan: cluster-8delta-granular`
//! "Test names + assertions" bullet.
//!
//! # Why these tests live in `djogi/tests/`
//!
//! The surface check is an integration-level
//! consumer test: it verifies that someone writing
//! `use djogi::cache::*;` (and only `djogi` in their `Cargo.toml`)
//! can actually reach `Punnu`, `BasicPredicate`, etc. Putting it in
//! the `djogi` crate's `tests/` directory lets cargo build the test
//! binary against the public `djogi` crate API exactly as an adopter
//! would. The lihaaf compile-pass fixture in
//! `djogi-macros/tests/compile_pass` covers the same surface from the
//! macro-consumer angle (a model definition that imports through
//! `djogi::cache::*`).
use ;
/// Minimal `Cacheable` implementor for the surface tests below.
///
/// Hand-rolled because T7.2 (auto-emit `Cacheable` from
/// `#[derive(Model)]`) lands in the next commit. The fields are
/// trivial — `id` only — and the `Fields` companion struct is unit-
/// shaped so we do not need to import sassi's `Field` accessor type
/// directly. Hand impls of `Cacheable::fields()` are explicitly
/// supported per `sassi::cacheable` — the doc says "hand impls are
/// supported when the macro doesn't fit", and an empty companion
/// struct is the smallest valid shape.
;
/// Pins `djogi::cache::Punnu` as a reachable type — adopters can
/// construct an empty pool with the default config through the
/// re-exported builder. The test compiles when the symbol is
/// reachable; runtime behaviour is sassi's responsibility.
/// Pins `djogi::cache::BasicPredicate` as a reachable type. Uses the
/// `True` no-op variant rather than a `Field::eq` lift because the
/// `Field` accessor is not part of T7.1's re-export set (only the
/// trait + algebra surface is). Constructing the `True` variant is
/// sufficient to lock the type-level visibility per the cluster
/// plan's "BasicPredicate::True (sassi's no-op variant)" fallback.
/// The full `Field::eq → BasicPredicate` lift is exercised by the
/// `sassi` crate's own tests; T7.1 only verifies adopter
/// reachability of the type.