Change many test blocks to doctests/decltests

This commit is contained in:
Ryan Liptak
2024-02-26 15:14:43 -08:00
parent 16b3d1004e
commit 726a1149e0
51 changed files with 143 additions and 145 deletions

View File

@@ -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);