123456789101112131415161718192021 |
- #include "test/framework/catch.hpp"
- #include <string.h>
- #define SHELLMATTA_TRANSPORT
- #undef SHELLMATTA_YMODEM_CRC_NO_LOOKUP
- #include "test_crc_data.h"
- #include "src/shellmatta_crc.c"
- TEST_CASE( "shellmatta_crc crc16Fast" ) {
- uint32_t crc = crc16Fast((char*)"123456789", 9, crc16Table);
- REQUIRE(crc == 0x31C3u);
- }
- TEST_CASE( "shellmatta_crc crc16Fast - more data" ) {
- uint32_t crc = crc16Fast((char*)data, sizeof(data), crc16Table);
- REQUIRE(crc == data_crc_16);
- }
|