media: Update to zig 0.16.0, harden tests and add test build step
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user