Function addTest [src]
Creates an executable containing unit tests.
Equivalent to running the command zig test --test-no-exec ....
This step does not run the unit tests. Typically, the result of this
function will be passed to addRunArtifact, creating a Step.Run. These
two steps are separated because they are independently configured and
cached.
Prototype
pub fn addTest(b: *Build, options: TestOptions) *Step.Compile
Parameters
b: *Build
options: TestOptions
Source
pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
return .create(b, .{
.name = options.name,
.kind = if (options.emit_object) .test_obj else .@"test",
.root_module = options.root_module,
.max_rss = options.max_rss,
.filters = b.dupeStrings(options.filters),
.test_runner = options.test_runner,
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir,
});
}