Forcing semantic analysis of a single .zig file

what i did discover is std.test.refAllDecls* (described in this post), which basically does the trick…

i can now write something like:

test "this-file" {
    std.test.refAllDecls(@This());
}

and then invoke zig test -fno-emit-bin ... on this source file…

1 Like