MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / check

Function check

Libraries/QRCode/tests/run-tests.cpp:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "QrCode.hpp"
6
7static 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
24int main() {
25 std::clock_t t0, totalNayuki, totalRicMoo;

Callers 1

mainFunction · 0.70

Calls 2

qrcode_getModuleFunction · 0.85
getModuleMethod · 0.80

Tested by

no test coverage detected