≈ the.bay.news

Am I using Io.failing wrong?

Ziggit
Am I using Io.failing wrong?
This test spins in an infinite loop: test "failing Io fails to flush in positional mode" { var buffer: [128]u8 = undefined; var stdout: std.Io.File.Writer = .init(.stdout(), .failing, &buffer); try stdout.interface.writeAll("hello"); const actual = stdout.interface.flush(); // spins CPU forever try std.testing.expectError(error.WriteFailed, actual); } Any other failing seem to work as expected: test "failing Allocator fails" { const actual = std.mem.Allocator.failing.d...

This test spins in an infinite loop: test "failing Io fails to flush in positional mode" { var buffer: [128]u8 = undefined; var stdout: std.Io.File.Writer = .init(.stdout(),…

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.