From 06fcfcb3db90fc2d25fe105b614b7c3e580e9a25 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Fri, 20 Jan 2023 17:04:59 +0100 Subject: [PATCH] add internpool to test steps --- build.zig | 7 ++++++- src/zls.zig | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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()); +}