//! This file is auto-generated by tools/update_crc_catalog.zig.

const std = @import("std");
const testing = std.testing;
const verify = @import("../verify.zig");
const crc = @import("../crc.zig");

test "crc32 ieee regression" {
    const Crc = crc.@"CRC-32/ISO-HDLC";
    try testing.expectEqual(Crc.hash(""), 0x00000000);
    try testing.expectEqual(Crc.hash("a"), 0xe8b7be43);
    try testing.expectEqual(Crc.hash("abc"), 0x352441c2);
}

test "crc32 castagnoli regression" {
    const Crc = crc.@"CRC-32/ISCSI";
    try testing.expectEqual(Crc.hash(""), 0x00000000);
    try testing.expectEqual(Crc.hash("a"), 0xc1d04330);
    try testing.expectEqual(Crc.hash("abc"), 0x364b3fb7);
}

test "crc32 koopman regression" {
    const Crc = crc.@"CRC-32/KOOPMAN";
    try testing.expectEqual(Crc.hash(""), 0x00000000);
    try testing.expectEqual(Crc.hash("a"), 0x0da2aa8a);
    try testing.expectEqual(Crc.hash("abc"), 0xba2322ac);
}

test "CRC-3/GSM" {
    const Crc = crc.@"CRC-3/GSM";

    try testing.expectEqual(@as(u3, 0x4), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u3, 0x4), c.final());
}

test "CRC-3/ROHC" {
    const Crc = crc.@"CRC-3/ROHC";

    try testing.expectEqual(@as(u3, 0x6), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u3, 0x6), c.final());
}

test "CRC-4/G-704" {
    const Crc = crc.@"CRC-4/G-704";

    try testing.expectEqual(@as(u4, 0x7), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u4, 0x7), c.final());
}

test "CRC-4/INTERLAKEN" {
    const Crc = crc.@"CRC-4/INTERLAKEN";

    try testing.expectEqual(@as(u4, 0xb), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u4, 0xb), c.final());
}

test "CRC-5/EPC-C1G2" {
    const Crc = crc.@"CRC-5/EPC-C1G2";

    try testing.expectEqual(@as(u5, 0x00), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u5, 0x00), c.final());
}

test "CRC-5/G-704" {
    const Crc = crc.@"CRC-5/G-704";

    try testing.expectEqual(@as(u5, 0x07), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u5, 0x07), c.final());
}

test "CRC-5/USB" {
    const Crc = crc.@"CRC-5/USB";

    try testing.expectEqual(@as(u5, 0x19), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u5, 0x19), c.final());
}

test "CRC-6/CDMA2000-A" {
    const Crc = crc.@"CRC-6/CDMA2000-A";

    try testing.expectEqual(@as(u6, 0x0d), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u6, 0x0d), c.final());
}

test "CRC-6/CDMA2000-B" {
    const Crc = crc.@"CRC-6/CDMA2000-B";

    try testing.expectEqual(@as(u6, 0x3b), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u6, 0x3b), c.final());
}

test "CRC-6/DARC" {
    const Crc = crc.@"CRC-6/DARC";

    try testing.expectEqual(@as(u6, 0x26), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u6, 0x26), c.final());
}

test "CRC-6/G-704" {
    const Crc = crc.@"CRC-6/G-704";

    try testing.expectEqual(@as(u6, 0x06), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u6, 0x06), c.final());
}

test "CRC-6/GSM" {
    const Crc = crc.@"CRC-6/GSM";

    try testing.expectEqual(@as(u6, 0x13), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u6, 0x13), c.final());
}

test "CRC-7/MMC" {
    const Crc = crc.@"CRC-7/MMC";

    try testing.expectEqual(@as(u7, 0x75), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u7, 0x75), c.final());
}

test "CRC-7/ROHC" {
    const Crc = crc.@"CRC-7/ROHC";

    try testing.expectEqual(@as(u7, 0x53), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u7, 0x53), c.final());
}

test "CRC-7/UMTS" {
    const Crc = crc.@"CRC-7/UMTS";

    try testing.expectEqual(@as(u7, 0x61), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u7, 0x61), c.final());
}

test "CRC-8/AUTOSAR" {
    const Crc = crc.@"CRC-8/AUTOSAR";

    try testing.expectEqual(@as(u8, 0xdf), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xdf), c.final());
}

test "CRC-8/BLUETOOTH" {
    const Crc = crc.@"CRC-8/BLUETOOTH";

    try testing.expectEqual(@as(u8, 0x26), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x26), c.final());
}

test "CRC-8/CDMA2000" {
    const Crc = crc.@"CRC-8/CDMA2000";

    try testing.expectEqual(@as(u8, 0xda), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xda), c.final());
}

test "CRC-8/DARC" {
    const Crc = crc.@"CRC-8/DARC";

    try testing.expectEqual(@as(u8, 0x15), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x15), c.final());
}

test "CRC-8/DVB-S2" {
    const Crc = crc.@"CRC-8/DVB-S2";

    try testing.expectEqual(@as(u8, 0xbc), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xbc), c.final());
}

test "CRC-8/GSM-A" {
    const Crc = crc.@"CRC-8/GSM-A";

    try testing.expectEqual(@as(u8, 0x37), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x37), c.final());
}

test "CRC-8/GSM-B" {
    const Crc = crc.@"CRC-8/GSM-B";

    try testing.expectEqual(@as(u8, 0x94), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x94), c.final());
}

test "CRC-8/HITAG" {
    const Crc = crc.@"CRC-8/HITAG";

    try testing.expectEqual(@as(u8, 0xb4), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xb4), c.final());
}

test "CRC-8/I-432-1" {
    const Crc = crc.@"CRC-8/I-432-1";

    try testing.expectEqual(@as(u8, 0xa1), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xa1), c.final());
}

test "CRC-8/I-CODE" {
    const Crc = crc.@"CRC-8/I-CODE";

    try testing.expectEqual(@as(u8, 0x7e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x7e), c.final());
}

test "CRC-8/LTE" {
    const Crc = crc.@"CRC-8/LTE";

    try testing.expectEqual(@as(u8, 0xea), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xea), c.final());
}

test "CRC-8/MAXIM-DOW" {
    const Crc = crc.@"CRC-8/MAXIM-DOW";

    try testing.expectEqual(@as(u8, 0xa1), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xa1), c.final());
}

test "CRC-8/MIFARE-MAD" {
    const Crc = crc.@"CRC-8/MIFARE-MAD";

    try testing.expectEqual(@as(u8, 0x99), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x99), c.final());
}

test "CRC-8/NRSC-5" {
    const Crc = crc.@"CRC-8/NRSC-5";

    try testing.expectEqual(@as(u8, 0xf7), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xf7), c.final());
}

test "CRC-8/OPENSAFETY" {
    const Crc = crc.@"CRC-8/OPENSAFETY";

    try testing.expectEqual(@as(u8, 0x3e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x3e), c.final());
}

test "CRC-8/ROHC" {
    const Crc = crc.@"CRC-8/ROHC";

    try testing.expectEqual(@as(u8, 0xd0), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xd0), c.final());
}

test "CRC-8/SAE-J1850" {
    const Crc = crc.@"CRC-8/SAE-J1850";

    try testing.expectEqual(@as(u8, 0x4b), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x4b), c.final());
}

test "CRC-8/SMBUS" {
    const Crc = crc.@"CRC-8/SMBUS";

    try testing.expectEqual(@as(u8, 0xf4), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0xf4), c.final());
}

test "CRC-8/TECH-3250" {
    const Crc = crc.@"CRC-8/TECH-3250";

    try testing.expectEqual(@as(u8, 0x97), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x97), c.final());
}

test "CRC-8/WCDMA" {
    const Crc = crc.@"CRC-8/WCDMA";

    try testing.expectEqual(@as(u8, 0x25), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u8, 0x25), c.final());
}

test "CRC-10/ATM" {
    const Crc = crc.@"CRC-10/ATM";

    try testing.expectEqual(@as(u10, 0x199), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u10, 0x199), c.final());
}

test "CRC-10/CDMA2000" {
    const Crc = crc.@"CRC-10/CDMA2000";

    try testing.expectEqual(@as(u10, 0x233), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u10, 0x233), c.final());
}

test "CRC-10/GSM" {
    const Crc = crc.@"CRC-10/GSM";

    try testing.expectEqual(@as(u10, 0x12a), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u10, 0x12a), c.final());
}

test "CRC-11/FLEXRAY" {
    const Crc = crc.@"CRC-11/FLEXRAY";

    try testing.expectEqual(@as(u11, 0x5a3), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u11, 0x5a3), c.final());
}

test "CRC-11/UMTS" {
    const Crc = crc.@"CRC-11/UMTS";

    try testing.expectEqual(@as(u11, 0x061), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u11, 0x061), c.final());
}

test "CRC-12/CDMA2000" {
    const Crc = crc.@"CRC-12/CDMA2000";

    try testing.expectEqual(@as(u12, 0xd4d), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u12, 0xd4d), c.final());
}

test "CRC-12/DECT" {
    const Crc = crc.@"CRC-12/DECT";

    try testing.expectEqual(@as(u12, 0xf5b), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u12, 0xf5b), c.final());
}

test "CRC-12/GSM" {
    const Crc = crc.@"CRC-12/GSM";

    try testing.expectEqual(@as(u12, 0xb34), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u12, 0xb34), c.final());
}

test "CRC-12/UMTS" {
    const Crc = crc.@"CRC-12/UMTS";

    try testing.expectEqual(@as(u12, 0xdaf), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u12, 0xdaf), c.final());
}

test "CRC-13/BBC" {
    const Crc = crc.@"CRC-13/BBC";

    try testing.expectEqual(@as(u13, 0x04fa), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u13, 0x04fa), c.final());
}

test "CRC-14/DARC" {
    const Crc = crc.@"CRC-14/DARC";

    try testing.expectEqual(@as(u14, 0x082d), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u14, 0x082d), c.final());
}

test "CRC-14/GSM" {
    const Crc = crc.@"CRC-14/GSM";

    try testing.expectEqual(@as(u14, 0x30ae), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u14, 0x30ae), c.final());
}

test "CRC-15/CAN" {
    const Crc = crc.@"CRC-15/CAN";

    try testing.expectEqual(@as(u15, 0x059e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u15, 0x059e), c.final());
}

test "CRC-15/MPT1327" {
    const Crc = crc.@"CRC-15/MPT1327";

    try testing.expectEqual(@as(u15, 0x2566), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u15, 0x2566), c.final());
}

test "CRC-16/ARC" {
    const Crc = crc.@"CRC-16/ARC";

    try testing.expectEqual(@as(u16, 0xbb3d), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xbb3d), c.final());
}

test "CRC-16/CDMA2000" {
    const Crc = crc.@"CRC-16/CDMA2000";

    try testing.expectEqual(@as(u16, 0x4c06), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x4c06), c.final());
}

test "CRC-16/CMS" {
    const Crc = crc.@"CRC-16/CMS";

    try testing.expectEqual(@as(u16, 0xaee7), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xaee7), c.final());
}

test "CRC-16/DDS-110" {
    const Crc = crc.@"CRC-16/DDS-110";

    try testing.expectEqual(@as(u16, 0x9ecf), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x9ecf), c.final());
}

test "CRC-16/DECT-R" {
    const Crc = crc.@"CRC-16/DECT-R";

    try testing.expectEqual(@as(u16, 0x007e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x007e), c.final());
}

test "CRC-16/DECT-X" {
    const Crc = crc.@"CRC-16/DECT-X";

    try testing.expectEqual(@as(u16, 0x007f), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x007f), c.final());
}

test "CRC-16/DNP" {
    const Crc = crc.@"CRC-16/DNP";

    try testing.expectEqual(@as(u16, 0xea82), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xea82), c.final());
}

test "CRC-16/EN-13757" {
    const Crc = crc.@"CRC-16/EN-13757";

    try testing.expectEqual(@as(u16, 0xc2b7), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xc2b7), c.final());
}

test "CRC-16/GENIBUS" {
    const Crc = crc.@"CRC-16/GENIBUS";

    try testing.expectEqual(@as(u16, 0xd64e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xd64e), c.final());
}

test "CRC-16/GSM" {
    const Crc = crc.@"CRC-16/GSM";

    try testing.expectEqual(@as(u16, 0xce3c), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xce3c), c.final());
}

test "CRC-16/IBM-3740" {
    const Crc = crc.@"CRC-16/IBM-3740";

    try testing.expectEqual(@as(u16, 0x29b1), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x29b1), c.final());
}

test "CRC-16/IBM-SDLC" {
    const Crc = crc.@"CRC-16/IBM-SDLC";

    try testing.expectEqual(@as(u16, 0x906e), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x906e), c.final());
}

test "CRC-16/ISO-IEC-14443-3-A" {
    const Crc = crc.@"CRC-16/ISO-IEC-14443-3-A";

    try testing.expectEqual(@as(u16, 0xbf05), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xbf05), c.final());
}

test "CRC-16/KERMIT" {
    const Crc = crc.@"CRC-16/KERMIT";

    try testing.expectEqual(@as(u16, 0x2189), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x2189), c.final());
}

test "CRC-16/LJ1200" {
    const Crc = crc.@"CRC-16/LJ1200";

    try testing.expectEqual(@as(u16, 0xbdf4), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xbdf4), c.final());
}

test "CRC-16/M17" {
    const Crc = crc.@"CRC-16/M17";

    try testing.expectEqual(@as(u16, 0x772b), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x772b), c.final());
}

test "CRC-16/MAXIM-DOW" {
    const Crc = crc.@"CRC-16/MAXIM-DOW";

    try testing.expectEqual(@as(u16, 0x44c2), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x44c2), c.final());
}

test "CRC-16/MCRF4XX" {
    const Crc = crc.@"CRC-16/MCRF4XX";

    try testing.expectEqual(@as(u16, 0x6f91), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x6f91), c.final());
}

test "CRC-16/MODBUS" {
    const Crc = crc.@"CRC-16/MODBUS";

    try testing.expectEqual(@as(u16, 0x4b37), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x4b37), c.final());
}

test "CRC-16/NRSC-5" {
    const Crc = crc.@"CRC-16/NRSC-5";

    try testing.expectEqual(@as(u16, 0xa066), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xa066), c.final());
}

test "CRC-16/OPENSAFETY-A" {
    const Crc = crc.@"CRC-16/OPENSAFETY-A";

    try testing.expectEqual(@as(u16, 0x5d38), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x5d38), c.final());
}

test "CRC-16/OPENSAFETY-B" {
    const Crc = crc.@"CRC-16/OPENSAFETY-B";

    try testing.expectEqual(@as(u16, 0x20fe), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x20fe), c.final());
}

test "CRC-16/PROFIBUS" {
    const Crc = crc.@"CRC-16/PROFIBUS";

    try testing.expectEqual(@as(u16, 0xa819), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xa819), c.final());
}

test "CRC-16/RIELLO" {
    const Crc = crc.@"CRC-16/RIELLO";

    try testing.expectEqual(@as(u16, 0x63d0), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x63d0), c.final());
}

test "CRC-16/SPI-FUJITSU" {
    const Crc = crc.@"CRC-16/SPI-FUJITSU";

    try testing.expectEqual(@as(u16, 0xe5cc), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xe5cc), c.final());
}

test "CRC-16/T10-DIF" {
    const Crc = crc.@"CRC-16/T10-DIF";

    try testing.expectEqual(@as(u16, 0xd0db), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xd0db), c.final());
}

test "CRC-16/TELEDISK" {
    const Crc = crc.@"CRC-16/TELEDISK";

    try testing.expectEqual(@as(u16, 0x0fb3), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x0fb3), c.final());
}

test "CRC-16/TMS37157" {
    const Crc = crc.@"CRC-16/TMS37157";

    try testing.expectEqual(@as(u16, 0x26b1), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x26b1), c.final());
}

test "CRC-16/UMTS" {
    const Crc = crc.@"CRC-16/UMTS";

    try testing.expectEqual(@as(u16, 0xfee8), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xfee8), c.final());
}

test "CRC-16/USB" {
    const Crc = crc.@"CRC-16/USB";

    try testing.expectEqual(@as(u16, 0xb4c8), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0xb4c8), c.final());
}

test "CRC-16/XMODEM" {
    const Crc = crc.@"CRC-16/XMODEM";

    try testing.expectEqual(@as(u16, 0x31c3), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u16, 0x31c3), c.final());
}

test "CRC-17/CAN-FD" {
    const Crc = crc.@"CRC-17/CAN-FD";

    try testing.expectEqual(@as(u17, 0x04f03), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u17, 0x04f03), c.final());
}

test "CRC-21/CAN-FD" {
    const Crc = crc.@"CRC-21/CAN-FD";

    try testing.expectEqual(@as(u21, 0x0ed841), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u21, 0x0ed841), c.final());
}

test "CRC-24/BLE" {
    const Crc = crc.@"CRC-24/BLE";

    try testing.expectEqual(@as(u24, 0xc25a56), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0xc25a56), c.final());
}

test "CRC-24/FLEXRAY-A" {
    const Crc = crc.@"CRC-24/FLEXRAY-A";

    try testing.expectEqual(@as(u24, 0x7979bd), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0x7979bd), c.final());
}

test "CRC-24/FLEXRAY-B" {
    const Crc = crc.@"CRC-24/FLEXRAY-B";

    try testing.expectEqual(@as(u24, 0x1f23b8), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0x1f23b8), c.final());
}

test "CRC-24/INTERLAKEN" {
    const Crc = crc.@"CRC-24/INTERLAKEN";

    try testing.expectEqual(@as(u24, 0xb4f3e6), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0xb4f3e6), c.final());
}

test "CRC-24/LTE-A" {
    const Crc = crc.@"CRC-24/LTE-A";

    try testing.expectEqual(@as(u24, 0xcde703), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0xcde703), c.final());
}

test "CRC-24/LTE-B" {
    const Crc = crc.@"CRC-24/LTE-B";

    try testing.expectEqual(@as(u24, 0x23ef52), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0x23ef52), c.final());
}

test "CRC-24/OPENPGP" {
    const Crc = crc.@"CRC-24/OPENPGP";

    try testing.expectEqual(@as(u24, 0x21cf02), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0x21cf02), c.final());
}

test "CRC-24/OS-9" {
    const Crc = crc.@"CRC-24/OS-9";

    try testing.expectEqual(@as(u24, 0x200fa5), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u24, 0x200fa5), c.final());
}

test "CRC-30/CDMA" {
    const Crc = crc.@"CRC-30/CDMA";

    try testing.expectEqual(@as(u30, 0x04c34abf), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u30, 0x04c34abf), c.final());
}

test "CRC-31/PHILIPS" {
    const Crc = crc.@"CRC-31/PHILIPS";

    try testing.expectEqual(@as(u31, 0x0ce9e46c), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u31, 0x0ce9e46c), c.final());
}

test "CRC-32/AIXM" {
    const Crc = crc.@"CRC-32/AIXM";

    try testing.expectEqual(@as(u32, 0x3010bf7f), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x3010bf7f), c.final());
}

test "CRC-32/AUTOSAR" {
    const Crc = crc.@"CRC-32/AUTOSAR";

    try testing.expectEqual(@as(u32, 0x1697d06a), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x1697d06a), c.final());
}

test "CRC-32/BASE91-D" {
    const Crc = crc.@"CRC-32/BASE91-D";

    try testing.expectEqual(@as(u32, 0x87315576), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x87315576), c.final());
}

test "CRC-32/BZIP2" {
    const Crc = crc.@"CRC-32/BZIP2";

    try testing.expectEqual(@as(u32, 0xfc891918), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0xfc891918), c.final());
}

test "CRC-32/CD-ROM-EDC" {
    const Crc = crc.@"CRC-32/CD-ROM-EDC";

    try testing.expectEqual(@as(u32, 0x6ec2edc4), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x6ec2edc4), c.final());
}

test "CRC-32/CKSUM" {
    const Crc = crc.@"CRC-32/CKSUM";

    try testing.expectEqual(@as(u32, 0x765e7680), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x765e7680), c.final());
}

test "CRC-32/ISCSI" {
    const Crc = crc.@"CRC-32/ISCSI";

    try testing.expectEqual(@as(u32, 0xe3069283), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0xe3069283), c.final());
}

test "CRC-32/ISO-HDLC" {
    const Crc = crc.@"CRC-32/ISO-HDLC";

    try testing.expectEqual(@as(u32, 0xcbf43926), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0xcbf43926), c.final());
}

test "CRC-32/JAMCRC" {
    const Crc = crc.@"CRC-32/JAMCRC";

    try testing.expectEqual(@as(u32, 0x340bc6d9), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x340bc6d9), c.final());
}

test "CRC-32/KOOPMAN" {
    const Crc = crc.@"CRC-32/KOOPMAN";

    try testing.expectEqual(@as(u32, 0x2d3dd0ae), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x2d3dd0ae), c.final());
}

test "CRC-32/MEF" {
    const Crc = crc.@"CRC-32/MEF";

    try testing.expectEqual(@as(u32, 0xd2c22f51), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0xd2c22f51), c.final());
}

test "CRC-32/MPEG-2" {
    const Crc = crc.@"CRC-32/MPEG-2";

    try testing.expectEqual(@as(u32, 0x0376e6e7), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0x0376e6e7), c.final());
}

test "CRC-32/XFER" {
    const Crc = crc.@"CRC-32/XFER";

    try testing.expectEqual(@as(u32, 0xbd0be338), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u32, 0xbd0be338), c.final());
}

test "CRC-40/GSM" {
    const Crc = crc.@"CRC-40/GSM";

    try testing.expectEqual(@as(u40, 0xd4164fc646), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u40, 0xd4164fc646), c.final());
}

test "CRC-64/ECMA-182" {
    const Crc = crc.@"CRC-64/ECMA-182";

    try testing.expectEqual(@as(u64, 0x6c40df5f0b497347), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0x6c40df5f0b497347), c.final());
}

test "CRC-64/GO-ISO" {
    const Crc = crc.@"CRC-64/GO-ISO";

    try testing.expectEqual(@as(u64, 0xb90956c775a41001), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0xb90956c775a41001), c.final());
}

test "CRC-64/MS" {
    const Crc = crc.@"CRC-64/MS";

    try testing.expectEqual(@as(u64, 0x75d4b74f024eceea), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0x75d4b74f024eceea), c.final());
}

test "CRC-64/REDIS" {
    const Crc = crc.@"CRC-64/REDIS";

    try testing.expectEqual(@as(u64, 0xe9c6d914c4b8d9ca), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0xe9c6d914c4b8d9ca), c.final());
}

test "CRC-64/WE" {
    const Crc = crc.@"CRC-64/WE";

    try testing.expectEqual(@as(u64, 0x62ec59e3f1a4f00a), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0x62ec59e3f1a4f00a), c.final());
}

test "CRC-64/XZ" {
    const Crc = crc.@"CRC-64/XZ";

    try testing.expectEqual(@as(u64, 0x995dc9bbdf1939fa), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u64, 0x995dc9bbdf1939fa), c.final());
}

test "CRC-82/DARC" {
    const Crc = crc.@"CRC-82/DARC";

    try testing.expectEqual(@as(u82, 0x09ea83f625023801fd612), Crc.hash("123456789"));

    var c = Crc.init();
    c.update("1234");
    c.update("56789");
    try testing.expectEqual(@as(u82, 0x09ea83f625023801fd612), c.final());
}
