media: Update to zig 0.16.0, harden tests and add test build step

This commit is contained in:
2026-05-13 00:11:38 +02:00
parent 380145a986
commit dc839e098c
12 changed files with 200 additions and 44 deletions

View File

@@ -22,6 +22,10 @@ const Header = union(enum) {
pub fn initStatic(static: HeaderStatic) Header {
return .{ .static = static };
}
test "refAllDecls" {
std.testing.refAllDecls(@This());
}
};
const HeaderStreaming = void;
@@ -36,6 +40,10 @@ const HeaderStatic = struct {
const sample_rate: f64 = @floatFromInt(self.sample_rate);
return @floatCast(samples / sample_rate);
}
test "refAllDecls" {
std.testing.refAllDecls(@This());
}
};
/// The caller asserts that the buffer is at least `format.magic_length` bytes
@@ -73,3 +81,7 @@ pub fn info(buffer: []const u8) ?Header {
});
}
}
test "refAllDecls" {
std.testing.refAllDecls(@This());
}