| ... | @@ -368,11 +368,11 @@ pub fn expectEqualSlices(comptime T: type, expected: []const T, actual: []const | ... | @@ -368,11 +368,11 @@ pub fn expectEqualSlices(comptime T: type, expected: []const T, actual: []const |
| 368 | break :diff_index if (expected.len == actual.len) return else shortest; | 368 | break :diff_index if (expected.len == actual.len) return else shortest; |
| 369 | }; | 369 | }; |
| 370 | if (!backend_can_print) return error.TestExpectedEqual; | 370 | if (!backend_can_print) return error.TestExpectedEqual; |
| 371 | if (io.lockStderr(&.{}, null)) |stderr| { | 371 | // Intentionally using the debug Io instance rather than the testing Io instance. |
| 372 | defer io.unlockStderr(); | 372 | const stderr = std.debug.lockStderr(&.{}); |
| 373 | const w = &stderr.file_writer.interface; | 373 | defer std.debug.unlockStderr(); |
| 374 | failEqualSlices(T, expected, actual, diff_index, w, stderr.terminal_mode) catch {}; | 374 | const w = &stderr.file_writer.interface; |
| 375 | } else |_| {} | 375 | failEqualSlices(T, expected, actual, diff_index, w, stderr.terminal_mode) catch {}; |
| 376 | return error.TestExpectedEqual; | 376 | return error.TestExpectedEqual; |
| 377 | } | 377 | } |
| 378 | | 378 | |