diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7e9e15820297..000000000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# This file is for zig-specific build artifacts. -# If you have OS-specific or editor-specific files to ignore, -# such as *.swp or .DS_Store, put those in your global -# ~/.gitignore and put this in your ~/.gitconfig: -# -# [core] -# excludesfile = ~/.gitignore -# -# Cheers! -# -andrewrk - -.zig-cache/ -zig-out/ -/release/ -/debug/ -/build/ -/build-*/ -/docgen_tmp/ - -# Although this was renamed to .zig-cache, let's leave it here for a few -# releases to make it less annoying to work with multiple branches. -zig-cache/ diff --git a/lib/std/testing.zig b/lib/std/testing.zig index b99542e7e57b..f5350f6add17 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -642,6 +642,9 @@ 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 they are not equal, +/// then returns a test expected equal error. pub fn expectEqualStrings(expected: []const u8, actual: []const u8) !void { if (std.mem.indexOfDiff(u8, actual, expected)) |diff_index| { if (@inComptime()) {