authorgravatar for stephen.lumenta@gmail.comStephen Lumenta <stephen.lumenta@gmail.com> 2021-10-29 00:00:50+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-12-31 14:20:09-07:00
logcfc00e743e272e6c44d45f2e965f96c1656d59f3
tree03f45edb0b2746234a2476aeec4ffc62a365d8c0
parentf5cb3fc688768edea283f497a31e714ad387c207

fix expectStringEndsWith error output.

before it started outputting the actual starting, not ending characters.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/testing.zig+1-1
...@@ -406,7 +406,7 @@ pub fn expectStringEndsWith(actual: []const u8, expected_ends_with: []const u8)...@@ -406,7 +406,7 @@ pub fn expectStringEndsWith(actual: []const u8, expected_ends_with: []const u8)
406 return;406 return;
407407
408 const shortened_actual = if (actual.len >= expected_ends_with.len)408 const shortened_actual = if (actual.len >= expected_ends_with.len)
409 actual[0..expected_ends_with.len]409 actual[(actual.len - expected_ends_with.len)..]
410 else410 else
411 actual;411 actual;
412412