diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2024-02-26 15:14:43 -0800 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2024-02-26 15:18:31 -0800 |
| commit | 726a1149e05669e5cc05a16ce877bbb2be787e39 (patch) | |
| tree | 0f5ae1dd819410e2b88def157161141fd79c8b6a /lib/std/Thread | |
| parent | 16b3d1004ee520341839305826fe065eb5d8c818 (diff) | |
| download | zig-726a1149e05669e5cc05a16ce877bbb2be787e39.tar.gz zig-726a1149e05669e5cc05a16ce877bbb2be787e39.zip | |
Change many test blocks to doctests/decltests
Diffstat (limited to 'lib/std/Thread')
| -rw-r--r-- | lib/std/Thread/Condition.zig | 4 | ||||
| -rw-r--r-- | lib/std/Thread/Semaphore.zig | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/Thread/Condition.zig b/lib/std/Thread/Condition.zig index 5c436261a8..b1154f8bd0 100644 --- a/lib/std/Thread/Condition.zig +++ b/lib/std/Thread/Condition.zig @@ -362,7 +362,7 @@ test "wait and signal" { } } -test "signal" { +test signal { // This test requires spawning threads if (builtin.single_threaded) { return error.SkipZigTest; @@ -491,7 +491,7 @@ test "multi signal" { } } -test "broadcasting" { +test broadcast { // This test requires spawning threads if (builtin.single_threaded) { return error.SkipZigTest; diff --git a/lib/std/Thread/Semaphore.zig b/lib/std/Thread/Semaphore.zig index 47dccea6df..a82ae3d002 100644 --- a/lib/std/Thread/Semaphore.zig +++ b/lib/std/Thread/Semaphore.zig @@ -71,7 +71,7 @@ pub fn post(sem: *Semaphore) void { sem.cond.signal(); } -test "Semaphore" { +test Semaphore { if (builtin.single_threaded) { return error.SkipZigTest; } @@ -97,7 +97,7 @@ test "Semaphore" { try testing.expect(n == num_threads); } -test "timedWait" { +test timedWait { var sem = Semaphore{}; try testing.expectEqual(0, sem.permits); |
