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/crc.zig | |
| parent | 59f9253d94331cedd4d0518250c8094a064f6cd2 (diff) | |
| download | zig-fd77f2cfed81f3414c079909e079a812e23071c3.tar.gz zig-fd77f2cfed81f3414c079909e079a812e23071c3.zip | |
std: update usage of std.testing
Diffstat (limited to 'lib/std/hash/crc.zig')
| -rw-r--r-- | lib/std/hash/crc.zig | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/std/hash/crc.zig b/lib/std/hash/crc.zig index a2d6ed429c..391438f463 100644 --- a/lib/std/hash/crc.zig +++ b/lib/std/hash/crc.zig @@ -109,9 +109,9 @@ test "crc32 ieee" { const Crc32Ieee = Crc32WithPoly(.IEEE); - testing.expect(Crc32Ieee.hash("") == 0x00000000); - testing.expect(Crc32Ieee.hash("a") == 0xe8b7be43); - testing.expect(Crc32Ieee.hash("abc") == 0x352441c2); + try testing.expect(Crc32Ieee.hash("") == 0x00000000); + try testing.expect(Crc32Ieee.hash("a") == 0xe8b7be43); + try testing.expect(Crc32Ieee.hash("abc") == 0x352441c2); } test "crc32 castagnoli" { @@ -119,9 +119,9 @@ test "crc32 castagnoli" { const Crc32Castagnoli = Crc32WithPoly(.Castagnoli); - testing.expect(Crc32Castagnoli.hash("") == 0x00000000); - testing.expect(Crc32Castagnoli.hash("a") == 0xc1d04330); - testing.expect(Crc32Castagnoli.hash("abc") == 0x364b3fb7); + try testing.expect(Crc32Castagnoli.hash("") == 0x00000000); + try testing.expect(Crc32Castagnoli.hash("a") == 0xc1d04330); + try testing.expect(Crc32Castagnoli.hash("abc") == 0x364b3fb7); } // half-byte lookup table implementation. @@ -177,9 +177,9 @@ test "small crc32 ieee" { const Crc32Ieee = Crc32SmallWithPoly(.IEEE); - testing.expect(Crc32Ieee.hash("") == 0x00000000); - testing.expect(Crc32Ieee.hash("a") == 0xe8b7be43); - testing.expect(Crc32Ieee.hash("abc") == 0x352441c2); + try testing.expect(Crc32Ieee.hash("") == 0x00000000); + try testing.expect(Crc32Ieee.hash("a") == 0xe8b7be43); + try testing.expect(Crc32Ieee.hash("abc") == 0x352441c2); } test "small crc32 castagnoli" { @@ -187,7 +187,7 @@ test "small crc32 castagnoli" { const Crc32Castagnoli = Crc32SmallWithPoly(.Castagnoli); - testing.expect(Crc32Castagnoli.hash("") == 0x00000000); - testing.expect(Crc32Castagnoli.hash("a") == 0xc1d04330); - testing.expect(Crc32Castagnoli.hash("abc") == 0x364b3fb7); + try testing.expect(Crc32Castagnoli.hash("") == 0x00000000); + try testing.expect(Crc32Castagnoli.hash("a") == 0xc1d04330); + try testing.expect(Crc32Castagnoli.hash("abc") == 0x364b3fb7); } |
