test_crc32Slow.cpp 441 B

1234567891011121314151617181920
  1. #include "test/framework/catch.hpp"
  2. #include <string.h>
  3. #define SHELLMATTA_TRANSPORT_CRC_NO_LOOKUP
  4. #include "test_crc32_data.h"
  5. #include "src/shellmatta_crc.c"
  6. TEST_CASE( "shellmatta_crc crc32Slow" ) {
  7. uint32_t crc = crc32Slow((char*)"123456789", 9);
  8. REQUIRE( crc == 0xCBF43926u);
  9. }
  10. TEST_CASE( "shellmatta_crc crc32Slow - more data" ) {
  11. uint32_t crc = crc32Slow((char*)data, sizeof(data));
  12. REQUIRE(crc == data_crc);
  13. }