message: play around with unit testing

I think I am probably going to move unit tests to a separate
directory/file structure. This will allow me to add a bunch of utility
functions that don't get analyzed for the library compilation and also
avoid testing-only imports in the main modules.
This commit is contained in:
2023-08-15 22:22:36 -07:00
parent 970d274593
commit 3ced6db69d
3 changed files with 66 additions and 0 deletions

View File

@@ -33,6 +33,8 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
main_tests.linkLibrary(nats_c);
const run_main_tests = b.addRunArtifact(main_tests);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&run_main_tests.step);