aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/Thread')
-rw-r--r--lib/std/Thread/Condition.zig12
-rw-r--r--lib/std/Thread/Futex.zig8
-rw-r--r--lib/std/Thread/Mutex.zig6
-rw-r--r--lib/std/Thread/ResetEvent.zig6
-rw-r--r--lib/std/Thread/RwLock.zig4
-rw-r--r--lib/std/Thread/Semaphore.zig4
6 files changed, 20 insertions, 20 deletions
diff --git a/lib/std/Thread/Condition.zig b/lib/std/Thread/Condition.zig
index 83e5134538..b1154f8bd0 100644
--- a/lib/std/Thread/Condition.zig
+++ b/lib/std/Thread/Condition.zig
@@ -296,7 +296,7 @@ const FutexImpl = struct {
}
};
-test "Condition - smoke test" {
+test "smoke test" {
var mutex = Mutex{};
var cond = Condition{};
@@ -317,7 +317,7 @@ test "Condition - smoke test" {
}
// Inspired from: https://github.com/Amanieu/parking_lot/pull/129
-test "Condition - wait and signal" {
+test "wait and signal" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -362,7 +362,7 @@ test "Condition - wait and signal" {
}
}
-test "Condition - signal" {
+test signal {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -429,7 +429,7 @@ test "Condition - signal" {
}
}
-test "Condition - multi signal" {
+test "multi signal" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -491,7 +491,7 @@ test "Condition - multi signal" {
}
}
-test "Condition - broadcasting" {
+test broadcast {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -557,7 +557,7 @@ test "Condition - broadcasting" {
}
}
-test "Condition - broadcasting - wake all threads" {
+test "broadcasting - wake all threads" {
// Tests issue #12877
// This test requires spawning threads
if (builtin.single_threaded) {
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig
index 60f889f694..b6f37feda4 100644
--- a/lib/std/Thread/Futex.zig
+++ b/lib/std/Thread/Futex.zig
@@ -881,7 +881,7 @@ const PosixImpl = struct {
}
};
-test "Futex - smoke test" {
+test "smoke test" {
var value = atomic.Value(u32).init(0);
// Try waits with invalid values.
@@ -898,7 +898,7 @@ test "Futex - smoke test" {
Futex.wake(&value, std.math.maxInt(u32));
}
-test "Futex - signaling" {
+test "signaling" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -952,7 +952,7 @@ test "Futex - signaling" {
for (paddles) |p| try testing.expectEqual(p.current, num_iterations);
}
-test "Futex - broadcasting" {
+test "broadcasting" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -1054,7 +1054,7 @@ pub const Deadline = struct {
}
};
-test "Futex - Deadline" {
+test "Deadline" {
var deadline = Deadline.init(100 * std.time.ns_per_ms);
var futex_word = atomic.Value(u32).init(0);
diff --git a/lib/std/Thread/Mutex.zig b/lib/std/Thread/Mutex.zig
index a9024e6c5d..7beb7dd752 100644
--- a/lib/std/Thread/Mutex.zig
+++ b/lib/std/Thread/Mutex.zig
@@ -215,7 +215,7 @@ const FutexImpl = struct {
}
};
-test "Mutex - smoke test" {
+test "smoke test" {
var mutex = Mutex{};
try testing.expect(mutex.tryLock());
@@ -243,7 +243,7 @@ const NonAtomicCounter = struct {
}
};
-test "Mutex - many uncontended" {
+test "many uncontended" {
// This test requires spawning threads.
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -274,7 +274,7 @@ test "Mutex - many uncontended" {
for (runners) |r| try testing.expectEqual(r.counter.get(), num_increments);
}
-test "Mutex - many contended" {
+test "many contended" {
// This test requires spawning threads.
if (builtin.single_threaded) {
return error.SkipZigTest;
diff --git a/lib/std/Thread/ResetEvent.zig b/lib/std/Thread/ResetEvent.zig
index cd74f337fb..431d54e852 100644
--- a/lib/std/Thread/ResetEvent.zig
+++ b/lib/std/Thread/ResetEvent.zig
@@ -157,7 +157,7 @@ const FutexImpl = struct {
}
};
-test "ResetEvent - smoke test" {
+test "smoke test" {
// make sure the event is unset
var event = ResetEvent{};
try testing.expectEqual(false, event.isSet());
@@ -181,7 +181,7 @@ test "ResetEvent - smoke test" {
try testing.expectEqual(true, event.isSet());
}
-test "ResetEvent - signaling" {
+test "signaling" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
@@ -242,7 +242,7 @@ test "ResetEvent - signaling" {
try ctx.input();
}
-test "ResetEvent - broadcast" {
+test "broadcast" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
diff --git a/lib/std/Thread/RwLock.zig b/lib/std/Thread/RwLock.zig
index e0923c40ad..80207dee00 100644
--- a/lib/std/Thread/RwLock.zig
+++ b/lib/std/Thread/RwLock.zig
@@ -264,7 +264,7 @@ test "DefaultRwLock - internal state" {
try testing.expectEqual(rwl, DefaultRwLock{});
}
-test "RwLock - smoke test" {
+test "smoke test" {
var rwl = RwLock{};
rwl.lock();
@@ -293,7 +293,7 @@ test "RwLock - smoke test" {
rwl.unlock();
}
-test "RwLock - concurrent access" {
+test "concurrent access" {
if (builtin.single_threaded)
return;
diff --git a/lib/std/Thread/Semaphore.zig b/lib/std/Thread/Semaphore.zig
index 3253d17a8e..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 "Thread.Semaphore" {
+test Semaphore {
if (builtin.single_threaded) {
return error.SkipZigTest;
}
@@ -97,7 +97,7 @@ test "Thread.Semaphore" {
try testing.expect(n == num_threads);
}
-test "Thread.Semaphore - timedWait" {
+test timedWait {
var sem = Semaphore{};
try testing.expectEqual(0, sem.permits);