audio: add main tests
This commit is contained in:
parent
caef084a1c
commit
e712969a87
1 changed files with 7 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ const soundio_path = thisDir() ++ "/upstream/soundio";
|
||||||
|
|
||||||
pub const pkg = std.build.Pkg{
|
pub const pkg = std.build.Pkg{
|
||||||
.name = "audio",
|
.name = "audio",
|
||||||
.source = .{ .path = thisDir() ++ "/main.zig" },
|
.source = .{ .path = thisDir() ++ "/src/main.zig" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const soundio_pkg = std.build.Pkg{
|
const soundio_pkg = std.build.Pkg{
|
||||||
|
|
@ -21,11 +21,16 @@ pub fn build(b: *Builder) void {
|
||||||
|
|
||||||
const soundio_tests = b.addTest("soundio/main.zig");
|
const soundio_tests = b.addTest("soundio/main.zig");
|
||||||
soundio_tests.setBuildMode(mode);
|
soundio_tests.setBuildMode(mode);
|
||||||
soundio_tests.addPackage(pkg);
|
|
||||||
link(b, soundio_tests, .{});
|
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");
|
const test_step = b.step("test", "Run library tests");
|
||||||
test_step.dependOn(&soundio_tests.step);
|
test_step.dependOn(&soundio_tests.step);
|
||||||
|
test_step.dependOn(&main_tests.step);
|
||||||
|
|
||||||
inline for ([_][]const u8{
|
inline for ([_][]const u8{
|
||||||
"soundio-sine-wave",
|
"soundio-sine-wave",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue