mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Update testing.zig
Co-authored-by: Андрей Краевский <75577902+AndrewKraevskii@users.noreply.github.com>
This commit is contained in:
parent
7c056c66a8
commit
a4ffc85277
1 changed files with 1 additions and 1 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue