fn testThreadName(io: Io, thread: *Thread) !void
fn testThreadName(io: Io, thread: *Thread) !void { const testCases: []const []const u8 = &.{ "mythread", &@as([max_name_len]u8, @splat('b')), }; inline for (testCases) |tc| { try thread.setName(io, tc); var name_buffer: [max_name_len:0]u8 = undefined; const name = try thread.getName(&name_buffer); if (name) |value| { try std.testing.expectEqual(tc.len, value.len); try std.testing.expectEqualStrings(tc, value); } } }