diff --git a/build.zig b/build.zig index d96dd1f..fcdfc9c 100644 --- a/build.zig +++ b/build.zig @@ -49,7 +49,7 @@ pub fn build(b: *std.build.Builder) !void { "enable_tracy_callstack", b.option(bool, "enable_tracy_callstack", "Enable callstack graphs.") orelse false, ); - + exe_options.addOption( bool, "enable_failing_allocator", @@ -171,4 +171,9 @@ pub fn build(b: *std.build.Builder) !void { tests.setBuildMode(.Debug); tests.setTarget(target); test_step.dependOn(&tests.step); + + var src_tests = b.addTest("src/zls.zig"); + src_tests.setBuildMode(.Debug); + src_tests.setTarget(target); + test_step.dependOn(&src_tests.step); } diff --git a/src/zls.zig b/src/zls.zig index ffb943e..f3a5e5c 100644 --- a/src/zls.zig +++ b/src/zls.zig @@ -13,3 +13,8 @@ pub const URI = @import("uri.zig"); pub const DocumentStore = @import("DocumentStore.zig"); pub const ComptimeInterpreter = @import("ComptimeInterpreter.zig"); pub const InternPool = @import("InternPool.zig"); + +comptime { + const std = @import("std"); + std.testing.refAllDecls(@This()); +}