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
//! Rendering for the `not_error` assertion type, split out of `assertions.rs` (already over
//! the file-size cap) so this fix does not grow it further.
use Write as FmtWrite;
/// Render the `not_error` assertion: a visible, real check that the call succeeded, rather
/// than the vacuous body that used to be emitted here.
///
/// ~keep A `not_error`-only fixture used to render nothing on the theory that the call having
/// succeeded without throwing already proves it: every sibling backend (java, csharp,
/// typescript, swift, python, elixir) carried the identical reasoning and the identical bug,
/// since fixed -- see `java/assertions.rs`'s `not_error` doc comment for the full history. An
/// uncaught exception does fail the test, but a fixture whose only assertion is `not_error`
/// must still leave a real, visible assertion instead of a vacuous body: `inert_example` exists
/// specifically to catch a generated example that is green because it asserts nothing, and this
/// shape was invisible to it before the fix landed for the other backends -- it surfaced as 9
/// distinct kotlin fixtures in a real consumer's `alef e2e generate` run (`liter-llm`), each
/// logged individually once the inert-example ledger started naming refusals.
///
/// `assertNotNull` (not `assertTrue(x != null, ...)`) because Kotlin's compiler flags an
/// explicit `!= null` comparison against a statically non-nullable type as "condition is always
/// true"; `assertNotNull`'s `T?` parameter accepts a non-null `T` without tripping that check.
/// For streaming fixtures, assert on the drained `chunks` list (bound by `collect_snippet`
/// before this runs) instead of `result_var`, matching every other streaming assertion in
/// `assertions.rs`.
pub