This commit is contained in:
みけCAT 2025-02-21 22:17:50 +00:00 committed by GitHub
commit c748f8250e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 110 additions and 0 deletions

View file

@ -194,6 +194,50 @@ TestRegister.addTests([
}
]
},
{
name: "CRC-16-CCITT: nothing",
input: "",
expectedOutput: "0000",
recipeConfig: [
{
"op": "CRC-16-CCITT Checksum",
"args": []
}
]
},
{
name: "CRC-16-CCITT: basic string",
input: BASIC_STRING,
expectedOutput: "03ef",
recipeConfig: [
{
"op": "CRC-16-CCITT Checksum",
"args": []
}
]
},
{
name: "CRC-16-CCITT: UTF-8",
input: UTF8_STR,
expectedOutput: "cf94",
recipeConfig: [
{
"op": "CRC-16-CCITT Checksum",
"args": []
}
]
},
{
name: "CRC-16-CCITT: all bytes",
input: ALL_BYTES,
expectedOutput: "7e55",
recipeConfig: [
{
"op": "CRC-16-CCITT Checksum",
"args": []
}
]
},
{
name: "CRC-32: nothing",
input: "",

View file

@ -63,6 +63,7 @@ Fletcher-64: 7473657474736574
Adler-32: 045d01c1
CRC-8: b9
CRC-16: f82e
CRC-16-CCITT: 9b06
CRC-32: d87f7e0c
`,
recipeConfig: [