diff --git a/README.md b/README.md index 161de9c..f3fe9ca 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ We can add it to our project as simple as that: ``` DSP::CRC crc(0xEDB88320, 0xFFFFFFFF); for (uint8_t c: std::string("Hello World!")) crc(c); -assert(!crc(uint32_t(~0x1C291CA3))); +assert(~crc() == 0x1C291CA3); ``` ### [regression.hh](regression.hh) diff --git a/tests/crc.cc b/tests/crc.cc index 7dfc38c..23a2a22 100644 --- a/tests/crc.cc +++ b/tests/crc.cc @@ -14,7 +14,7 @@ int main() if (1) { DSP::CRC crc(0xEDB88320, 0xFFFFFFFF); for (uint8_t c: std::string("Hello World!")) crc(c); - assert(!crc(uint32_t(~0x1C291CA3))); + assert(~crc() == 0x1C291CA3); } if (1) { DSP::CRC crc(0xA8F4);