This commit introduces several improvements to the `trix` package, focusing on test coverage and robustness. - Adds a specific `ErrInvalidHeaderLength` error to the `Decode` function, providing clearer feedback when the header length is invalid. - Introduces a `TestPackUnpack_Ugly` test to ensure that calling `Pack` with a `nil` payload is handled gracefully. - Simplifies the `TestChecksum_Ugly` test by manually constructing a corrupted byte slice, making the test more direct and easier to understand. - Adds a new "Bad" test case to verify that the `Decode` function correctly handles invalid version numbers. |
||
|---|---|---|
| .. | ||
| crypt | ||
| enchantrix | ||
| trix | ||