| 5 | #include "QrCode.hpp" |
| 6 | |
| 7 | static uint32_t check(const qrcodegen::QrCode &nayuki, QRCode *ricmoo) { |
| 8 | uint32_t wrong = 0; |
| 9 | |
| 10 | if (nayuki.size != ricmoo->size) { wrong += (1 << 20); } |
| 11 | |
| 12 | int border = 4; |
| 13 | for (int y = -border; y < nayuki.size + border; y++) { |
| 14 | for (int x = -border; x < nayuki.size + border; x++) { |
| 15 | if (!!nayuki.getModule(x, y) != qrcode_getModule(ricmoo, x, y)) { |
| 16 | wrong++; |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | return wrong; |
| 22 | } |
| 23 | |
| 24 | int main() { |
| 25 | std::clock_t t0, totalNayuki, totalRicMoo; |
no test coverage detected