diff options
| author | Veikka Tuominen <git@vexu.eu> | 2021-05-04 20:47:26 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2021-05-08 15:15:30 +0300 |
| commit | fd77f2cfed81f3414c079909e079a812e23071c3 (patch) | |
| tree | f9facf463ab13791faa0820c347371067ed27a79 /lib/std/hash/adler.zig | |
| parent | 59f9253d94331cedd4d0518250c8094a064f6cd2 (diff) | |
| download | zig-fd77f2cfed81f3414c079909e079a812e23071c3.tar.gz zig-fd77f2cfed81f3414c079909e079a812e23071c3.zip | |
std: update usage of std.testing
Diffstat (limited to 'lib/std/hash/adler.zig')
| -rw-r--r-- | lib/std/hash/adler.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/hash/adler.zig b/lib/std/hash/adler.zig index 9cd85ba7cf..61408e82ee 100644 --- a/lib/std/hash/adler.zig +++ b/lib/std/hash/adler.zig @@ -99,21 +99,21 @@ pub const Adler32 = struct { }; test "adler32 sanity" { - testing.expectEqual(@as(u32, 0x620062), Adler32.hash("a")); - testing.expectEqual(@as(u32, 0xbc002ed), Adler32.hash("example")); + try testing.expectEqual(@as(u32, 0x620062), Adler32.hash("a")); + try testing.expectEqual(@as(u32, 0xbc002ed), Adler32.hash("example")); } test "adler32 long" { const long1 = [_]u8{1} ** 1024; - testing.expectEqual(@as(u32, 0x06780401), Adler32.hash(long1[0..])); + try testing.expectEqual(@as(u32, 0x06780401), Adler32.hash(long1[0..])); const long2 = [_]u8{1} ** 1025; - testing.expectEqual(@as(u32, 0x0a7a0402), Adler32.hash(long2[0..])); + try testing.expectEqual(@as(u32, 0x0a7a0402), Adler32.hash(long2[0..])); } test "adler32 very long" { const long = [_]u8{1} ** 5553; - testing.expectEqual(@as(u32, 0x707f15b2), Adler32.hash(long[0..])); + try testing.expectEqual(@as(u32, 0x707f15b2), Adler32.hash(long[0..])); } test "adler32 very long with variation" { @@ -129,5 +129,5 @@ test "adler32 very long with variation" { break :blk result; }; - testing.expectEqual(@as(u32, 0x5af38d6e), std.hash.Adler32.hash(long[0..])); + try testing.expectEqual(@as(u32, 0x5af38d6e), std.hash.Adler32.hash(long[0..])); } |
