Commit c5bd19e45e

Andrew Kelley <andrew@ziglang.org>
2024-03-21 22:02:58
std.Build.addTest: add doc comments
closes #15009
1 parent 31791ae
Changed files (1)
lib
lib/std/Build.zig
@@ -872,6 +872,14 @@ pub const TestOptions = struct {
     zig_lib_dir: ?LazyPath = null,
 };
 
+/// 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.
 pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
     return Step.Compile.create(b, .{
         .name = options.name,