commit cfc00e743e272e6c44d45f2e965f96c1656d59f3 (tree)
parent f5cb3fc688768edea283f497a31e714ad387c207
Author: Stephen Lumenta <stephen.lumenta@gmail.com>
Date: Fri, 29 Oct 2021 00:00:50 +0200
fix expectStringEndsWith error output.
before it started outputting the actual starting, not ending characters.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
@@ -406,7 +406,7 @@ pub fn expectStringEndsWith(actual: []const u8, expected_ends_with: []const u8)
return;
const shortened_actual = if (actual.len >= expected_ends_with.len)
- actual[0..expected_ends_with.len]
+ actual[(actual.len - expected_ends_with.len)..]
else
actual;