Skip to content

Commit 85c6621

Browse files
committed
fix(test): make property suite compile under pinned Zig 0.15.2
@typeinfo(...).@"enum".fields is comptime-only in 0.15.2; the three runtime 'for' loops over enum fields (P7, P7b, P13) now use 'inline for'. The suite had never compiled under the pinned toolchain (it is also not run in CI), so the recorded test counts never included its 14 tests. New verified baseline: 80 unit + 39 integration + 5 smoke + 14 property. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaWWedv6VQqeZaPvc94keN
1 parent 4f8ed4f commit 85c6621

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/interface/ffi/test/property_test.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ test "P7: ActionKind values are injective (no duplicates)" {
245245
// Collect all integer values into a fixed-size array and verify
246246
// no duplicates using a simple O(n^2) comparison (n=8, negligible cost).
247247
var seen: [fields.len]u8 = undefined;
248-
for (fields, 0..) |f, i| {
248+
inline for (fields, 0..) |f, i| {
249249
seen[i] = @intCast(f.value);
250250
}
251251

@@ -268,7 +268,7 @@ test "P7b: ActionKind covers all 8 expected action types" {
268268

269269
for (expected_names) |expected| {
270270
var found = false;
271-
for (fields) |f| {
271+
inline for (fields) |f| {
272272
if (std.mem.eql(u8, f.name, expected)) {
273273
found = true;
274274
break;
@@ -501,7 +501,7 @@ test "P13: ConfigFormat values are injective — no two variants share an intege
501501
const fields = @typeInfo(config_extract.ConfigFormat).@"enum".fields;
502502

503503
var seen: [fields.len]u8 = undefined;
504-
for (fields, 0..) |f, i| {
504+
inline for (fields, 0..) |f, i| {
505505
seen[i] = @intCast(f.value);
506506
}
507507

0 commit comments

Comments
 (0)