From e712969a879d033301a5656406e44b0e9b2df088 Mon Sep 17 00:00:00 2001 From: alichraghi Date: Fri, 8 Jul 2022 00:44:15 +0430 Subject: [PATCH] audio: add main tests --- audio/build.zig | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/audio/build.zig b/audio/build.zig index bf1ba5ad..54674f7b 100644 --- a/audio/build.zig +++ b/audio/build.zig @@ -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",