audio: add main tests

This commit is contained in:
alichraghi 2022-07-08 00:44:15 +04:30 committed by Stephen Gutekanst
parent caef084a1c
commit e712969a87

View file

@ -5,7 +5,7 @@ const soundio_path = thisDir() ++ "/upstream/soundio";
pub const pkg = std.build.Pkg{
.name = "audio",
.source = .{ .path = thisDir() ++ "/main.zig" },
.source = .{ .path = thisDir() ++ "/src/main.zig" },
};
const soundio_pkg = std.build.Pkg{
@ -21,11 +21,16 @@ pub fn build(b: *Builder) void {
const soundio_tests = b.addTest("soundio/main.zig");
soundio_tests.setBuildMode(mode);
soundio_tests.addPackage(pkg);
link(b, soundio_tests, .{});
const main_tests = b.addTest("src/main.zig");
main_tests.setBuildMode(mode);
main_tests.addPackage(soundio_pkg);
link(b, main_tests, .{});
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&soundio_tests.step);
test_step.dependOn(&main_tests.step);
inline for ([_][]const u8{
"soundio-sine-wave",