Skip to content

Commit 47679e0

Browse files
Fix invalid @test message call in e2e_test.jl (#29)
`test/e2e_test.jl:112` used `@test (cond) "message"`, but Julia's `@test` macro does not accept a fail-message argument — this raised *"invalid test macro call"* at macro-expansion time, aborting the **entire** E2E suite before any assertion executed. Pre-existing on `main`; surfaced while finishing the rename. Fix: compute the serialisability predicate, `@warn` with the offending `key`/type on failure (preserving the original diagnostic), then `@test` the predicate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 86e9a6d commit 47679e0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/e2e_test.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ using Statistikles
109109
# Every value must be a JSON-serialisable primitive (Number, String, Bool, Nothing)
110110
for (key, val) in report
111111
@test key isa String
112-
@test (val isa Number || val isa String || val isa Bool || val === nothing ||
113-
val isa Vector) "Key $key has non-serialisable type $(typeof(val))"
112+
serialisable = val isa Number || val isa String || val isa Bool ||
113+
val === nothing || val isa Vector
114+
serialisable || @warn "Non-serialisable report value" key type=typeof(val)
115+
@test serialisable
114116
end
115117

116118
# Key statistical assertions on the well-known [1..10] dataset

0 commit comments

Comments
 (0)