summaryrefslogtreecommitdiff
path: root/test/math/modMulIterativ.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
commit630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch)
treeadee732c8d2cdcb46e5f400611c370b4c2ec1947 /test/math/modMulIterativ.cpp
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'test/math/modMulIterativ.cpp')
-rw-r--r--test/math/modMulIterativ.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/math/modMulIterativ.cpp b/test/math/modMulIterativ.cpp
index 4f794c5..7783026 100644
--- a/test/math/modMulIterativ.cpp
+++ b/test/math/modMulIterativ.cpp
@@ -14,7 +14,7 @@ void stress_test() {
k++;
expected = (expected + a) % n;
} while (k < 100);
- queries += n;
+ queries++;
}
cerr << "tested queries: " << queries << endl;
}
@@ -28,7 +28,7 @@ void stress_test_large() {
ll expected = (lll)a * b % n;
auto got = mulMod(a, b, n);
if (got != expected) cerr << "got: " << got << ", expected: " << expected << FAIL;
- queries += n;
+ queries++;
}
cerr << "tested queries: " << queries << endl;
}
@@ -52,6 +52,6 @@ void performance_test() {
int main() {
stress_test();
stress_test_large();
- performance_test();
+ if (!sanitize) performance_test();
}