Update testing.zig

Co-authored-by: Андрей Краевский <75577902+AndrewKraevskii@users.noreply.github.com>
This commit is contained in:
Julian M. Wagner 2025-11-12 16:23:19 +01:00 committed by GitHub
parent 7c056c66a8
commit a4ffc85277
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -644,7 +644,7 @@ pub fn tmpDir(opts: std.fs.Dir.OpenOptions) TmpDir {
/// This functions is to be used only in tests. When the two strings are not
/// equal, prints diagnostics to stderr to show exactly how they are not equal,
/// then returns a test expected equal error.
/// then returns a `error.TestExpectedEqual`.
pub fn expectEqualStrings(expected: []const u8, actual: []const u8) !void {
if (std.mem.indexOfDiff(u8, actual, expected)) |diff_index| {
if (@inComptime()) {